From: Chandler Carruth Date: Thu, 26 Mar 2015 23:45:40 +0000 (+0000) Subject: [Modules] Delete stale, pointless code. All tests still pass with this X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59ad8075ea077bc5dac1fbf5e07e69a533b31171;p=clang [Modules] Delete stale, pointless code. All tests still pass with this logic removed. This logic was both inserting all builtins into the identifier table and ensuring they would get serialized. The first happens unconditionally now, and we always write out the entire identifier table. This code can simply go away. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233331 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index 24ba783c4e..3f2c46d80e 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -4335,21 +4335,6 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, if (Context.ExternCContext) DeclIDs[Context.ExternCContext] = PREDEF_DECL_EXTERN_C_CONTEXT_ID; - if (!Chain) { - // Make sure that we emit IdentifierInfos (and any attached - // declarations) for builtins. We don't need to do this when we're - // emitting chained PCH files, because all of the builtins will be - // in the original PCH file. - // FIXME: Modules won't like this at all. - IdentifierTable &Table = PP.getIdentifierTable(); - SmallVector BuiltinNames; - if (!Context.getLangOpts().NoBuiltin) { - Context.BuiltinInfo.GetBuiltinNames(BuiltinNames); - } - for (unsigned I = 0, N = BuiltinNames.size(); I != N; ++I) - getIdentifierRef(&Table.get(BuiltinNames[I])); - } - // Build a record containing all of the tentative definitions in this file, in // TentativeDefinitions order. Generally, this record will be empty for // headers.