diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-12 18:47:39 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-12 18:47:39 +0000 |
commit | a95387786d10fd36f50c9cf88b609c57b17be5e5 (patch) | |
tree | 795494b02b15142a38409933bd32ef0d6ffc3c65 /clang/lib/Lex/PPLexerChange.cpp | |
parent | 4951c67875710a8b825ec9bfb5181eef77ac22d5 (diff) | |
download | bcm5719-llvm-a95387786d10fd36f50c9cf88b609c57b17be5e5.tar.gz bcm5719-llvm-a95387786d10fd36f50c9cf88b609c57b17be5e5.zip |
Don't mark include guard macros as implicitly private. This isn't
actually a terribly good heuristic, and the world is too horrible for
it to work.
llvm-svn: 146393
Diffstat (limited to 'clang/lib/Lex/PPLexerChange.cpp')
-rw-r--r-- | clang/lib/Lex/PPLexerChange.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/clang/lib/Lex/PPLexerChange.cpp b/clang/lib/Lex/PPLexerChange.cpp index 37b62a6d025..24dda4f84c8 100644 --- a/clang/lib/Lex/PPLexerChange.cpp +++ b/clang/lib/Lex/PPLexerChange.cpp @@ -212,28 +212,8 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) { CurPPLexer->MIOpt.GetControllingMacroAtEndOfFile()) { // Okay, this has a controlling macro, remember in HeaderFileInfo. if (const FileEntry *FE = - SourceMgr.getFileEntryForID(CurPPLexer->getFileID())) { + SourceMgr.getFileEntryForID(CurPPLexer->getFileID())) HeaderInfo.SetFileControllingMacro(FE, ControllingMacro); - - // Controlling macros are implicitly private. - if (MacroInfo *MI = getMacroInfo( - const_cast<IdentifierInfo *>(ControllingMacro))) { - if (MI->getVisibilityLocation().isInvalid()) { - // FIXME: HACK! Mark controlling macros from system headers as - // exported, along with our own Clang headers. This is a gross - // hack to deal with the fact that system headers are included in - // many places within module headers, but are not themselves - // modularized. - if ((StringRef(FE->getName()).find("lib/clang") - == StringRef::npos) && - (StringRef(FE->getName()).find("usr/include") - == StringRef::npos) && - (StringRef(FE->getName()).find("usr/local/include") - == StringRef::npos)) - MI->setVisibility(false, SourceLocation()); - } - } - } } } |