diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 1f02d3cf2460..e574e25f5b92 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -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(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