diff options
author | Ben Langmuir <blangmuir@apple.com> | 2014-01-31 01:06:56 +0000 |
---|---|---|
committer | Ben Langmuir <blangmuir@apple.com> | 2014-01-31 01:06:56 +0000 |
commit | 332aafede3985657683b3aa334b72fd5fb05a06f (patch) | |
tree | ec6279b7661af49a918598700d37d83ed03b082d /clang/lib/Serialization/ASTWriter.cpp | |
parent | 4046a30c7345527063036183d2f3aef9a1e1529c (diff) | |
download | bcm5719-llvm-332aafede3985657683b3aa334b72fd5fb05a06f.tar.gz bcm5719-llvm-332aafede3985657683b3aa334b72fd5fb05a06f.zip |
Fix autolinking when modules are imported in pch files
Add the ImportDecl to the set of interesting delcarations that are
deserialized eagerly when an AST file is loaded (rather than lazily like
most decls). This is required to get auto linking to work when there is
no explicit import in the main file. Also resolve a FIXME to rename
'ExternalDefinitions', since that is only one of the things that need eager
deserialization. The new name is 'EagerlyDeserializedDecls'. The corresponding
AST bitcode is also renamed.
llvm-svn: 200505
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index e931a7eeb2a..18d83cfe6ae 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -813,7 +813,7 @@ void ASTWriter::WriteBlockInfoBlock() { RECORD(DECL_OFFSET); RECORD(IDENTIFIER_OFFSET); RECORD(IDENTIFIER_TABLE); - RECORD(EXTERNAL_DEFINITIONS); + RECORD(EAGERLY_DESERIALIZED_DECLS); RECORD(SPECIAL_TYPES); RECORD(STATISTICS); RECORD(TENTATIVE_DEFINITIONS); @@ -4192,8 +4192,8 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, Stream.EmitRecord(SPECIAL_TYPES, SpecialTypes); // Write the record containing external, unnamed definitions. - if (!ExternalDefinitions.empty()) - Stream.EmitRecord(EXTERNAL_DEFINITIONS, ExternalDefinitions); + if (!EagerlyDeserializedDecls.empty()) + Stream.EmitRecord(EAGERLY_DESERIALIZED_DECLS, EagerlyDeserializedDecls); // Write the record containing tentative definitions. if (!TentativeDefinitions.empty()) |