| 1 | //===- Transformation.h -----------------------------------------*- C++ -*-===// |
|---|---|
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
| 9 | // Abstract base class for source transformations. A Transformation is an |
| 10 | // ASTConsumer that consumes a previously computed WPASuite. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_CLANG_SCALABLESTATICANALYSIS_SOURCETRANSFORMATION_TRANSFORMATION_H |
| 15 | #define LLVM_CLANG_SCALABLESTATICANALYSIS_SOURCETRANSFORMATION_TRANSFORMATION_H |
| 16 | |
| 17 | #include "clang/AST/ASTConsumer.h" |
| 18 | #include "clang/ScalableStaticAnalysis/Core/WholeProgramAnalysis/WPASuite.h" |
| 19 | #include "clang/ScalableStaticAnalysis/SourceTransformation/SourceEditEmitter.h" |
| 20 | #include "clang/ScalableStaticAnalysis/SourceTransformation/TransformationReportEmitter.h" |
| 21 | |
| 22 | namespace clang::ssaf { |
| 23 | |
| 24 | class Transformation : public clang::ASTConsumer { |
| 25 | public: |
| 26 | Transformation(const WPASuite &Suite, SourceEditEmitter &Edits, |
| 27 | TransformationReportEmitter &Report) |
| 28 | : Suite(Suite), Edits(Edits), Report(Report) {} |
| 29 | |
| 30 | protected: |
| 31 | const WPASuite &Suite; |
| 32 | SourceEditEmitter &Edits; |
| 33 | TransformationReportEmitter &Report; |
| 34 | }; |
| 35 | |
| 36 | } // namespace clang::ssaf |
| 37 | |
| 38 | #endif // LLVM_CLANG_SCALABLESTATICANALYSIS_SOURCETRANSFORMATION_TRANSFORMATION_H |
| 39 |