diff options
author | Lubos Lunak <l.lunak@centrum.cz> | 2014-05-01 12:54:03 +0000 |
---|---|---|
committer | Lubos Lunak <l.lunak@centrum.cz> | 2014-05-01 12:54:03 +0000 |
commit | 576a0415cb8b0615c2d6e8fd87e5427ddbc7fb20 (patch) | |
tree | 032789f8ef00241add4e5a3b7f2f93b7d3269f34 /clang/lib/Frontend | |
parent | 4a04294882bdd530bd0c3b388980e5326423e1b2 (diff) | |
download | bcm5719-llvm-576a0415cb8b0615c2d6e8fd87e5427ddbc7fb20.tar.gz bcm5719-llvm-576a0415cb8b0615c2d6e8fd87e5427ddbc7fb20.zip |
do not warn about unknown pragmas in modes that do not handle them (pr9537)
And refactor to have just one place in code that sets up the empty
pragma handlers.
llvm-svn: 207758
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r-- | clang/lib/Frontend/FrontendActions.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Frontend/PrintPreprocessedOutput.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index c8b8a21c508..4cafa237ff2 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -592,7 +592,7 @@ void PreprocessOnlyAction::ExecuteAction() { Preprocessor &PP = getCompilerInstance().getPreprocessor(); // Ignore unknown pragmas. - PP.AddPragmaHandler(new EmptyPragmaHandler()); + PP.IgnorePragmas(); Token Tok; // Start parsing the specified input file. diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp index 349401ae4ea..94b327534fe 100644 --- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp +++ b/clang/lib/Frontend/PrintPreprocessedOutput.cpp @@ -671,7 +671,7 @@ static int MacroIDCompare(const id_macro_pair *LHS, const id_macro_pair *RHS) { static void DoPrintMacros(Preprocessor &PP, raw_ostream *OS) { // Ignore unknown pragmas. - PP.AddPragmaHandler(new EmptyPragmaHandler()); + PP.IgnorePragmas(); // -dM mode just scans and ignores all tokens in the files, then dumps out // the macro table at the end. |