FrontendActions.cpp 1.0 KB

123456789101112131415161718192021222324252627
  1. //===--- FrontendActions.cpp ----------------------------------------------===//
  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. #include "clang/StaticAnalyzer/Frontend/FrontendActions.h"
  9. #include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h"
  10. #include "clang/StaticAnalyzer/Frontend/ModelConsumer.h"
  11. using namespace clang;
  12. using namespace ento;
  13. std::unique_ptr<ASTConsumer>
  14. AnalysisAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
  15. return CreateAnalysisConsumer(CI);
  16. }
  17. ParseModelFileAction::ParseModelFileAction(llvm::StringMap<Stmt *> &Bodies)
  18. : Bodies(Bodies) {}
  19. std::unique_ptr<ASTConsumer>
  20. ParseModelFileAction::CreateASTConsumer(CompilerInstance &CI,
  21. StringRef InFile) {
  22. return std::make_unique<ModelConsumer>(Bodies);
  23. }