]> granicus.if.org Git - clang/commitdiff
Back out r139358 "[PCH] When loading the decls linked to an
authorDouglas Gregor <dgregor@apple.com>
Fri, 9 Sep 2011 21:05:56 +0000 (21:05 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 9 Sep 2011 21:05:56 +0000 (21:05 +0000)
identifier, also make them visible in the translation unit," which
isn't needed now that John's eliminated the AST dependency in blocks
CodeGen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139408 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTReader.cpp

index 1f02d3cf246027dd12a698db2f2fec2502147051..e574e25f5b92ed35167789198d033f7903674196 100644 (file)
@@ -4841,16 +4841,8 @@ ASTReader::SetGloballyVisibleDecls(IdentifierInfo *II,
     return;
   }
 
-  ASTContext &Ctx = *getContext();
   for (unsigned I = 0, N = DeclIDs.size(); I != N; ++I) {
     NamedDecl *D = cast<NamedDecl>(GetDecl(DeclIDs[I]));
-
-    // In C++, translation unit's visible decls map gets emitted in the AST
-    // file, but not on C; make the decl visible so it can be looked up.
-    if (!Ctx.getLangOptions().CPlusPlus)
-      SetExternalVisibleDeclsForName(Ctx.getTranslationUnitDecl(),
-                                     DeclarationName(II), D);
-
     if (SemaObj) {
       if (SemaObj->TUScope) {
         // Introduce this declaration into the translation-unit scope