clang 24.0.0git
SourceTransformationFrontendAction.h
Go to the documentation of this file.
1//===- SourceTransformationFrontendAction.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#ifndef LLVM_CLANG_SCALABLESTATICANALYSIS_FRONTEND_SOURCETRANSFORMATIONFRONTENDACTION_H
10#define LLVM_CLANG_SCALABLESTATICANALYSIS_FRONTEND_SOURCETRANSFORMATIONFRONTENDACTION_H
11
13#include <memory>
14
15namespace clang::ssaf {
16
17/// Wraps the existing \c FrontendAction and runs the source-transformation
18/// pipeline alongside it. The transformation consumes a \c WPASuite read from
19/// \c SSAFOptions::GlobalScopeAnalysisResult and emits source edits and a
20/// transformation report to the configured output files.
22public:
24 std::unique_ptr<FrontendAction> WrappedAction);
26
27protected:
28 std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
29 StringRef InFile) override;
30};
31
32} // namespace clang::ssaf
33
34#endif // LLVM_CLANG_SCALABLESTATICANALYSIS_FRONTEND_SOURCETRANSFORMATIONFRONTENDACTION_H
Defines the clang::FrontendAction interface and various convenience abstract classes (clang::ASTFront...
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
WrapperFrontendAction(std::unique_ptr< FrontendAction > WrappedAction)
Construct a WrapperFrontendAction from an existing action, taking ownership of it.
std::unique_ptr< FrontendAction > WrappedAction
SourceTransformationFrontendAction(std::unique_ptr< FrontendAction > WrappedAction)
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.