summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/MacroInfo.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-10-17 15:32:29 +0000
committerDouglas Gregor <dgregor@apple.com>2011-10-17 15:32:29 +0000
commitebf004990163b7588d2140a2c44be3ae991b4e29 (patch)
treebf639690104decc6e9a594ce4773a895f2310e46 /clang/lib/Lex/MacroInfo.cpp
parent71129d5e9e3a290df21ef8f3389c1b54b10f62cd (diff)
downloadbcm5719-llvm-ebf004990163b7588d2140a2c44be3ae991b4e29.tar.gz
bcm5719-llvm-ebf004990163b7588d2140a2c44be3ae991b4e29.zip
For modules, all macros that aren't include guards are implicitly
public. Add a __private_macro__ directive to hide a macro, similar to the __module_private__ declaration specifier. llvm-svn: 142188
Diffstat (limited to 'clang/lib/Lex/MacroInfo.cpp')
-rw-r--r--clang/lib/Lex/MacroInfo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Lex/MacroInfo.cpp b/clang/lib/Lex/MacroInfo.cpp
index 5a7af563983..3d0c9a1c2b5 100644
--- a/clang/lib/Lex/MacroInfo.cpp
+++ b/clang/lib/Lex/MacroInfo.cpp
@@ -27,7 +27,8 @@ MacroInfo::MacroInfo(SourceLocation DefLoc) : Location(DefLoc) {
IsAllowRedefinitionsWithoutWarning = false;
IsWarnIfUnused = false;
IsDefinitionLengthCached = false;
-
+ IsPublic = true;
+
ArgumentList = 0;
NumArguments = 0;
}
@@ -48,6 +49,8 @@ MacroInfo::MacroInfo(const MacroInfo &MI, llvm::BumpPtrAllocator &PPAllocator) {
IsWarnIfUnused = MI.IsWarnIfUnused;
IsDefinitionLengthCached = MI.IsDefinitionLengthCached;
DefinitionLength = MI.DefinitionLength;
+ IsPublic = MI.IsPublic;
+
ArgumentList = 0;
NumArguments = 0;
setArgumentList(MI.ArgumentList, MI.NumArguments, PPAllocator);
OpenPOWER on IntegriCloud