summaryrefslogtreecommitdiffstats
path: root/lib/Frontend/FrontendActions.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-03-21 10:50:08 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-03-21 10:50:08 +0000
commit1e255aab650a7fa2047fd953cae65b12215280af (patch)
tree508d4388db78f87d35bf26a0400b4b03bc4c1f13 /lib/Frontend/FrontendActions.cpp
parent1033b7c1e32962948b01a25145829f17bc70a8de (diff)
downloadFreeBSD-src-1e255aab650a7fa2047fd953cae65b12215280af.zip
FreeBSD-src-1e255aab650a7fa2047fd953cae65b12215280af.tar.gz
Update clang to r99115.
Diffstat (limited to 'lib/Frontend/FrontendActions.cpp')
-rw-r--r--lib/Frontend/FrontendActions.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/lib/Frontend/FrontendActions.cpp b/lib/Frontend/FrontendActions.cpp
index 1e210b4..251b8e4 100644
--- a/lib/Frontend/FrontendActions.cpp
+++ b/lib/Frontend/FrontendActions.cpp
@@ -23,6 +23,18 @@
using namespace clang;
//===----------------------------------------------------------------------===//
+// Custom Actions
+//===----------------------------------------------------------------------===//
+
+ASTConsumer *InitOnlyAction::CreateASTConsumer(CompilerInstance &CI,
+ llvm::StringRef InFile) {
+ return new ASTConsumer();
+}
+
+void InitOnlyAction::ExecuteAction() {
+}
+
+//===----------------------------------------------------------------------===//
// AST Consumer Actions
//===----------------------------------------------------------------------===//
@@ -185,7 +197,8 @@ void DumpTokensAction::ExecuteAction() {
Preprocessor &PP = getCompilerInstance().getPreprocessor();
// Start preprocessing the specified input file.
Token Tok;
- PP.EnterMainSourceFile();
+ if (PP.EnterMainSourceFile())
+ return;
do {
PP.Lex(Tok);
PP.DumpToken(Tok, true);
@@ -213,7 +226,8 @@ void ParseOnlyAction::ExecuteAction() {
llvm::OwningPtr<Action> PA(new MinimalAction(PP));
Parser P(PP, *PA);
- PP.EnterMainSourceFile();
+ if (PP.EnterMainSourceFile())
+ return;
P.ParseTranslationUnit();
}
@@ -222,7 +236,8 @@ void PreprocessOnlyAction::ExecuteAction() {
Token Tok;
// Start parsing the specified input file.
- PP.EnterMainSourceFile();
+ if (PP.EnterMainSourceFile())
+ return;
do {
PP.Lex(Tok);
} while (Tok.isNot(tok::eof));
@@ -237,7 +252,8 @@ void PrintParseAction::ExecuteAction() {
llvm::OwningPtr<Action> PA(CreatePrintParserActionsAction(PP, OS));
Parser P(PP, *PA);
- PP.EnterMainSourceFile();
+ if (PP.EnterMainSourceFile())
+ return;
P.ParseTranslationUnit();
}
OpenPOWER on IntegriCloud