28 #ifndef LLVM_CLANG_TOOLING_EXECUTION_H 29 #define LLVM_CLANG_TOOLING_EXECUTION_H 33 #include "llvm/Support/Error.h" 34 #include "llvm/Support/Registry.h" 48 virtual std::vector<std::pair<std::string, std::string>>
AllKVResults() = 0;
50 llvm::function_ref<
void(StringRef Key, StringRef Value)> Callback) = 0;
56 std::vector<std::pair<std::string, std::string>>
AllKVResults()
override;
57 void forEachResult(llvm::function_ref<
void(StringRef Key, StringRef Value)>
61 std::vector<std::pair<std::string, std::string>> KVResults;
74 void reportResult(StringRef Key, StringRef
Value);
105 virtual StringRef getExecutorName()
const = 0;
114 llvm::Error execute(std::unique_ptr<FrontendActionFactory> Action);
116 llvm::Error execute(std::unique_ptr<FrontendActionFactory> Action,
135 virtual void mapVirtualFile(StringRef FilePath, StringRef Content) = 0;
163 const char *Overview =
nullptr);
168 llvm::cl::OptionCategory &Category,
169 const char *Overview =
nullptr);
175 #endif // LLVM_CLANG_TOOLING_EXECUTION_H virtual std::string getRevision()
ExecutionContext(ToolResults *Results)
Initializes a context. This does not take ownership of Results.
The context of an execution, including the information about compilation and results.
virtual std::string getCurrentCompilationUnit()
Dataflow Directional Tag Classes.
std::unique_ptr< DiagnosticConsumer > create(StringRef OutputFile, DiagnosticOptions *Diags, bool MergeChildRecords=false)
Returns a DiagnosticConsumer that serializes diagnostics to a bitcode file.
virtual ~ExecutionContext()
virtual std::string getCorpus()