summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FrontendActions.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-20 20:35:58 +0000
committerChris Lattner <sabre@nondot.org>2010-04-20 20:35:58 +0000
commitfb24a3a4ec3d625981bb822e021dc89a0cf3fde1 (patch)
tree20d53042ca9baae6abb062b22670a5305f79fc27 /clang/lib/Frontend/FrontendActions.cpp
parent877aaa9706e8bed893cebfc292a2ca305ec30663 (diff)
downloadbcm5719-llvm-fb24a3a4ec3d625981bb822e021dc89a0cf3fde1.tar.gz
bcm5719-llvm-fb24a3a4ec3d625981bb822e021dc89a0cf3fde1.zip
push some source location information down through the compiler,
into ContentCache::getBuffer. This allows it to produce diagnostics on the broken #include line instead of without a location. llvm-svn: 101939
Diffstat (limited to 'clang/lib/Frontend/FrontendActions.cpp')
-rw-r--r--clang/lib/Frontend/FrontendActions.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp
index ce3e841b904..e2b2fd7deb3 100644
--- a/clang/lib/Frontend/FrontendActions.cpp
+++ b/clang/lib/Frontend/FrontendActions.cpp
@@ -236,8 +236,7 @@ void DumpTokensAction::ExecuteAction() {
Preprocessor &PP = getCompilerInstance().getPreprocessor();
// Start preprocessing the specified input file.
Token Tok;
- if (PP.EnterMainSourceFile())
- return;
+ PP.EnterMainSourceFile();
do {
PP.Lex(Tok);
PP.DumpToken(Tok, true);
@@ -265,8 +264,7 @@ void ParseOnlyAction::ExecuteAction() {
llvm::OwningPtr<Action> PA(new MinimalAction(PP));
Parser P(PP, *PA);
- if (PP.EnterMainSourceFile())
- return;
+ PP.EnterMainSourceFile();
P.ParseTranslationUnit();
}
@@ -275,8 +273,7 @@ void PreprocessOnlyAction::ExecuteAction() {
Token Tok;
// Start parsing the specified input file.
- if (PP.EnterMainSourceFile())
- return;
+ PP.EnterMainSourceFile();
do {
PP.Lex(Tok);
} while (Tok.isNot(tok::eof));
@@ -291,8 +288,7 @@ void PrintParseAction::ExecuteAction() {
llvm::OwningPtr<Action> PA(CreatePrintParserActionsAction(PP, OS));
Parser P(PP, *PA);
- if (PP.EnterMainSourceFile())
- return;
+ PP.EnterMainSourceFile();
P.ParseTranslationUnit();
}
OpenPOWER on IntegriCloud