summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PrintPreprocessedOutput.cpp
diff options
context:
space:
mode:
authorFrederich Munch <colsebas@hotmail.com>2017-04-26 19:47:31 +0000
committerFrederich Munch <colsebas@hotmail.com>2017-04-26 19:47:31 +0000
commitb7755111a26f0ba590ef2a73f339f34570c3827a (patch)
treea3ad4383a64bc7eefb62338c19b83bf5d4235431 /clang/lib/Frontend/PrintPreprocessedOutput.cpp
parent2074b67ec26cc7657d0a354e0650c4ddeecd0e9f (diff)
downloadbcm5719-llvm-b7755111a26f0ba590ef2a73f339f34570c3827a.tar.gz
bcm5719-llvm-b7755111a26f0ba590ef2a73f339f34570c3827a.zip
PPCallbacks::MacroUndefined, change signature and add test.
Summary: The PPCallbacks::MacroUndefined callback is currently insufficient for clients that need to track the MacroDirectives. This patch adds an additional argument to PPCallbacks::MacroUndefined that is the undef MacroDirective. Reviewers: bruno, manmanren Reviewed By: bruno Subscribers: nemanjai, cfe-commits Differential Revision: https://reviews.llvm.org/D29923 llvm-svn: 301449
Diffstat (limited to 'clang/lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r--clang/lib/Frontend/PrintPreprocessedOutput.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp
index d48b952ef20..3168b3da70a 100644
--- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/clang/lib/Frontend/PrintPreprocessedOutput.cpp
@@ -172,7 +172,8 @@ public:
/// MacroUndefined - This hook is called whenever a macro #undef is seen.
void MacroUndefined(const Token &MacroNameTok,
- const MacroDefinition &MD) override;
+ const MacroDefinition &MD,
+ const MacroDirective *Undef) override;
};
} // end anonymous namespace
@@ -389,7 +390,8 @@ void PrintPPOutputPPCallbacks::MacroDefined(const Token &MacroNameTok,
}
void PrintPPOutputPPCallbacks::MacroUndefined(const Token &MacroNameTok,
- const MacroDefinition &MD) {
+ const MacroDefinition &MD,
+ const MacroDirective *Undef) {
// Only print out macro definitions in -dD mode.
if (!DumpDefines) return;
OpenPOWER on IntegriCloud