diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-06-11 20:10:12 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-06-11 20:10:12 +0000 |
commit | c72cc5072cdc1a1a6e05f9d0f962f293a69248c4 (patch) | |
tree | f861d6b7f91f00310a29f5a112fbf0cdddcb267d /lib/Frontend/PrintPreprocessedOutput.cpp | |
parent | ae6de57e6c823471f04a15dbfbbb39449d4d1e56 (diff) |
Preprocessor: Ignore unknown pragmas in -E -dM and -Eonly modes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105830 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r-- | lib/Frontend/PrintPreprocessedOutput.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Frontend/PrintPreprocessedOutput.cpp b/lib/Frontend/PrintPreprocessedOutput.cpp index b6c18b7731..e89c425f47 100644 --- a/lib/Frontend/PrintPreprocessedOutput.cpp +++ b/lib/Frontend/PrintPreprocessedOutput.cpp @@ -454,6 +454,9 @@ static int MacroIDCompare(const void* a, const void* b) { } static void DoPrintMacros(Preprocessor &PP, llvm::raw_ostream *OS) { + // Ignore unknown pragmas. + PP.AddPragmaHandler(0, new EmptyPragmaHandler()); + // -dM mode just scans and ignores all tokens in the files, then dumps out // the macro table at the end. PP.EnterMainSourceFile(); |