From e127a0d80155b45dafe77f2b4380e5fa111a3345 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 20 Apr 2010 20:35:58 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101939 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/FrontendActions.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'lib/Frontend/FrontendActions.cpp') diff --git a/lib/Frontend/FrontendActions.cpp b/lib/Frontend/FrontendActions.cpp index ce3e841b90..e2b2fd7deb 100644 --- a/lib/Frontend/FrontendActions.cpp +++ b/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 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 PA(CreatePrintParserActionsAction(PP, OS)); Parser P(PP, *PA); - if (PP.EnterMainSourceFile()) - return; + PP.EnterMainSourceFile(); P.ParseTranslationUnit(); } -- cgit v1.2.3-70-g09d2