diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-10-17 15:32:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-10-17 15:32:29 +0000 |
commit | aa93a875605536d72a10359a0098396192b7d4ec (patch) | |
tree | e4f0f3e94714c6fe029f52e9e96f7e779ba26b30 /lib/Lex/MacroInfo.cpp | |
parent | 05edf668f0984bfa2994ddc8bb7b78d9fb24cf11 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142188 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/MacroInfo.cpp')
-rw-r--r-- | lib/Lex/MacroInfo.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Lex/MacroInfo.cpp b/lib/Lex/MacroInfo.cpp index 5a7af56398..3d0c9a1c2b 100644 --- a/lib/Lex/MacroInfo.cpp +++ b/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); |