#include "clang/AST/AST.h" #include "clang/AST/ASTConsumer.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/CodeGen/ObjectFilePCHContainerWriter.h" #include "clang/Frontend/ASTConsumers.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/FrontendActions.h" #include "clang/Rewrite/Core/Rewriter.h" #include "clang/Serialization/ObjectFilePCHContainerReader.h" #include "clang/Tooling/CommonOptionsParser.h" #include "clang/Tooling/Tooling.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/raw_ostream.h" #include <sstream> #include <string> usingnamespaceclang; usingnamespaceclang::driver; usingnamespaceclang::tooling; static llvm::cl::OptionCategory InstrCategory("LLDB Instrumentation Generator"); class SBVisitor : public RecursiveASTVisitor<SBVisitor> { … }; class SBConsumer : public ASTConsumer { … }; class SBAction : public ASTFrontendAction { … }; int main(int argc, const char **argv) { … }