blob: 567102b7656d8b753e2c5f4dfeac3083ef63eeb8 [file] [log] [blame]
Daniel Dunbarc1b17292010-06-15 17:48:49 +00001//===--- 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
Argyrios Kyrtzidis556c45e2011-02-14 18:13:31 +000010#include "clang/StaticAnalyzer/Frontend/FrontendActions.h"
Chandler Carruth3a022472012-12-04 09:13:33 +000011#include "clang/Frontend/CompilerInstance.h"
Alexander Kornienko6de39492014-01-03 17:23:10 +000012#include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h"
Daniel Dunbarc1b17292010-06-15 17:48:49 +000013using namespace clang;
Ted Kremenek98857c92010-12-23 07:20:52 +000014using namespace ento;
Daniel Dunbarc1b17292010-06-15 17:48:49 +000015
David Blaikie6beb6aa2014-08-10 19:56:51 +000016std::unique_ptr<ASTConsumer>
17AnalysisAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
Daniel Dunbarc1b17292010-06-15 17:48:49 +000018 return CreateAnalysisConsumer(CI.getPreprocessor(),
19 CI.getFrontendOpts().OutputFile,
Jordy Rose59cce712011-08-16 21:24:21 +000020 CI.getAnalyzerOpts(),
21 CI.getFrontendOpts().Plugins);
Daniel Dunbarc1b17292010-06-15 17:48:49 +000022}
23