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
22namespace clang::ssaf {
23
24class SSAFOptions;
25
26class Transformation : public clang::ASTConsumer {
27public:
28 Transformation(const WPASuite &Suite, const SSAFOptions &Opts,
29 SourceEditEmitter &Edits, TransformationReportEmitter &Report)
30 : Suite(Suite), Opts(Opts), Edits(Edits), Report(Report) {}
31
32protected:
33 const WPASuite &Suite;
34 const SSAFOptions &Opts;
35 SourceEditEmitter &Edits;
36 TransformationReportEmitter &Report;
37};
38
39} // namespace clang::ssaf
40
41#endif // LLVM_CLANG_SCALABLESTATICANALYSIS_SOURCETRANSFORMATION_TRANSFORMATION_H
42