diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-20 20:35:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-20 20:35:58 +0000 |
commit | fb24a3a4ec3d625981bb822e021dc89a0cf3fde1 (patch) | |
tree | 20d53042ca9baae6abb062b22670a5305f79fc27 /clang/lib/Frontend/PrintPreprocessedOutput.cpp | |
parent | 877aaa9706e8bed893cebfc292a2ca305ec30663 (diff) | |
download | llvm-fb24a3a4ec3d625981bb822e021dc89a0cf3fde1.zip llvm-fb24a3a4ec3d625981bb822e021dc89a0cf3fde1.tar.gz llvm-fb24a3a4ec3d625981bb822e021dc89a0cf3fde1.tar.bz2 |
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/PrintPreprocessedOutput.cpp')
-rw-r--r-- | clang/lib/Frontend/PrintPreprocessedOutput.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp index 17edd12..b6c18b7 100644 --- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp +++ b/clang/lib/Frontend/PrintPreprocessedOutput.cpp @@ -456,8 +456,7 @@ static int MacroIDCompare(const void* a, const void* b) { static void DoPrintMacros(Preprocessor &PP, llvm::raw_ostream *OS) { // -dM mode just scans and ignores all tokens in the files, then dumps out // the macro table at the end. - if (PP.EnterMainSourceFile()) - return; + PP.EnterMainSourceFile(); Token Tok; do PP.Lex(Tok); @@ -502,8 +501,7 @@ void clang::DoPrintPreprocessedInput(Preprocessor &PP, llvm::raw_ostream *OS, PP.addPPCallbacks(Callbacks); // After we have configured the preprocessor, enter the main file. - if (PP.EnterMainSourceFile()) - return; + PP.EnterMainSourceFile(); // Consume all of the tokens that come from the predefines buffer. Those // should not be emitted into the output and are guaranteed to be at the |