FrontendActions.cpp 1014 B

12345678910111213141516171819202122232425262728
  1. //===--- FrontendActions.cpp ----------------------------------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #include "clang/StaticAnalyzer/Frontend/FrontendActions.h"
  10. #include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h"
  11. #include "clang/StaticAnalyzer/Frontend/ModelConsumer.h"
  12. using namespace clang;
  13. using namespace ento;
  14. std::unique_ptr<ASTConsumer>
  15. AnalysisAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
  16. return CreateAnalysisConsumer(CI);
  17. }
  18. ParseModelFileAction::ParseModelFileAction(llvm::StringMap<Stmt *> &Bodies)
  19. : Bodies(Bodies) {}
  20. std::unique_ptr<ASTConsumer>
  21. ParseModelFileAction::CreateASTConsumer(CompilerInstance &CI,
  22. StringRef InFile) {
  23. return llvm::make_unique<ModelConsumer>(Bodies);
  24. }