summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/MacroInfo.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-04-30 23:10:40 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-04-30 23:10:40 +0000
commit3ffa61d576b05a3d0c4b2d35db75e810cc9cedbe (patch)
tree99f9c9232789df944fe85e3ac98c2d52a84d92ba /clang/lib/Lex/MacroInfo.cpp
parentcd2514dca6b7376c7be4ba4d867480d7a9cd82f6 (diff)
downloadbcm5719-llvm-3ffa61d576b05a3d0c4b2d35db75e810cc9cedbe.tar.gz
bcm5719-llvm-3ffa61d576b05a3d0c4b2d35db75e810cc9cedbe.zip
[modules] Add a mechanism to dump information about a macro.
Wire this up to "#pragma clang __debug macro <name>". llvm-svn: 236280
Diffstat (limited to 'clang/lib/Lex/MacroInfo.cpp')
-rw-r--r--clang/lib/Lex/MacroInfo.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Lex/MacroInfo.cpp b/clang/lib/Lex/MacroInfo.cpp
index 7581fe3cd7a..109b6c12b89 100644
--- a/clang/lib/Lex/MacroInfo.cpp
+++ b/clang/lib/Lex/MacroInfo.cpp
@@ -219,10 +219,8 @@ void MacroDirective::dump() const {
Out << " prev " << Prev;
if (IsFromPCH) Out << " from_pch";
- if (IsPublic)
- Out << " public";
- else if (isa<VisibilityMacroDirective>(this))
- Out << " private";
+ if (isa<VisibilityMacroDirective>(this))
+ Out << (IsPublic ? " public" : " private");
if (auto *DMD = dyn_cast<DefMacroDirective>(this)) {
if (auto *Info = DMD->getInfo()) {
OpenPOWER on IntegriCloud