diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-10 23:43:47 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-10 23:43:47 +0000 |
commit | 78165b53bf6ae8f0fc60f2648028f4ebc4556817 (patch) | |
tree | 8de7ca8a848b6bb03ac026ac74de6f43407d4e02 /clang/lib/Serialization | |
parent | 4d21fa05f7c228d3f5c83fce9472d72994333559 (diff) | |
download | bcm5719-llvm-78165b53bf6ae8f0fc60f2648028f4ebc4556817.tar.gz bcm5719-llvm-78165b53bf6ae8f0fc60f2648028f4ebc4556817.zip |
Truth in advertising: LocallyScopedExternalDecls actually only contains
external declarations with C language linkage.
llvm-svn: 172150
Diffstat (limited to 'clang/lib/Serialization')
-rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 14 | ||||
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 20 |
2 files changed, 17 insertions, 17 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index eca9918a790..f32d53fd8a7 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -2119,9 +2119,9 @@ bool ASTReader::ReadASTBlock(ModuleFile &F) { } break; - case LOCALLY_SCOPED_EXTERNAL_DECLS: + case LOCALLY_SCOPED_EXTERN_C_DECLS: for (unsigned I = 0, N = Record.size(); I != N; ++I) - LocallyScopedExternalDecls.push_back(getGlobalDeclID(F, Record[I])); + LocallyScopedExternCDecls.push_back(getGlobalDeclID(F, Record[I])); break; case SELECTOR_OFFSETS: { @@ -5961,14 +5961,14 @@ void ASTReader::ReadDynamicClasses(SmallVectorImpl<CXXRecordDecl *> &Decls) { } void -ASTReader::ReadLocallyScopedExternalDecls(SmallVectorImpl<NamedDecl *> &Decls) { - for (unsigned I = 0, N = LocallyScopedExternalDecls.size(); I != N; ++I) { - NamedDecl *D - = dyn_cast_or_null<NamedDecl>(GetDecl(LocallyScopedExternalDecls[I])); +ASTReader::ReadLocallyScopedExternCDecls(SmallVectorImpl<NamedDecl *> &Decls) { + for (unsigned I = 0, N = LocallyScopedExternCDecls.size(); I != N; ++I) { + NamedDecl *D + = dyn_cast_or_null<NamedDecl>(GetDecl(LocallyScopedExternCDecls[I])); if (D) Decls.push_back(D); } - LocallyScopedExternalDecls.clear(); + LocallyScopedExternCDecls.clear(); } void ASTReader::ReadReferencedSelectors( diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index ac2409833f3..4f24abdac05 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -798,7 +798,7 @@ void ASTWriter::WriteBlockInfoBlock() { RECORD(STATISTICS); RECORD(TENTATIVE_DEFINITIONS); RECORD(UNUSED_FILESCOPED_DECLS); - RECORD(LOCALLY_SCOPED_EXTERNAL_DECLS); + RECORD(LOCALLY_SCOPED_EXTERN_C_DECLS); RECORD(SELECTOR_OFFSETS); RECORD(METHOD_POOL); RECORD(PP_COUNTER_VALUE); @@ -3506,18 +3506,18 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, } } - // Build a record containing all of the locally-scoped external + // Build a record containing all of the locally-scoped extern "C" // declarations in this header file. Generally, this record will be // empty. - RecordData LocallyScopedExternalDecls; + RecordData LocallyScopedExternCDecls; // FIXME: This is filling in the AST file in densemap order which is // nondeterminstic! for (llvm::DenseMap<DeclarationName, NamedDecl *>::iterator - TD = SemaRef.LocallyScopedExternalDecls.begin(), - TDEnd = SemaRef.LocallyScopedExternalDecls.end(); + TD = SemaRef.LocallyScopedExternCDecls.begin(), + TDEnd = SemaRef.LocallyScopedExternCDecls.end(); TD != TDEnd; ++TD) { if (!TD->second->isFromASTFile()) - AddDeclRef(TD->second, LocallyScopedExternalDecls); + AddDeclRef(TD->second, LocallyScopedExternCDecls); } // Build a record containing all of the ext_vector declarations. @@ -3749,10 +3749,10 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, Stream.EmitRecord(WEAK_UNDECLARED_IDENTIFIERS, WeakUndeclaredIdentifiers); - // Write the record containing locally-scoped external definitions. - if (!LocallyScopedExternalDecls.empty()) - Stream.EmitRecord(LOCALLY_SCOPED_EXTERNAL_DECLS, - LocallyScopedExternalDecls); + // Write the record containing locally-scoped extern "C" definitions. + if (!LocallyScopedExternCDecls.empty()) + Stream.EmitRecord(LOCALLY_SCOPED_EXTERN_C_DECLS, + LocallyScopedExternCDecls); // Write the record containing ext_vector type names. if (!ExtVectorDecls.empty()) |