diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2013-01-31 03:23:57 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2013-01-31 03:23:57 +0000 |
commit | f0f5616457e34d9183db2bd74341a2d1641d3054 (patch) | |
tree | a4ec1dac6c32eb7728a725b6d1d687c8474fecce /clang/lib/Serialization/ASTWriter.cpp | |
parent | 60bd4be17a08dae3f742b71a9e622408d4fecc1d (diff) | |
download | bcm5719-llvm-f0f5616457e34d9183db2bd74341a2d1641d3054.tar.gz bcm5719-llvm-f0f5616457e34d9183db2bd74341a2d1641d3054.zip |
Remove elements from Sema.UndefinedInternals as functions are defined. Also
filter the elements before emitting them into a PCH. No user-visible
functionality change, except that PCH files may be smaller?
llvm-svn: 174034
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index 25e3d52f370..8120799c11d 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -3590,10 +3590,11 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, // Build a record of all used, undefined objects with internal linkage. RecordData UndefinedInternals; - for (llvm::MapVector<NamedDecl*, SourceLocation>::iterator - I = SemaRef.UndefinedInternals.begin(), - IEnd = SemaRef.UndefinedInternals.end(); - I != IEnd; ++I) { + + SmallVector<std::pair<NamedDecl *, SourceLocation>, 16> Undefined; + SemaRef.getUndefinedInternals(Undefined); + for (SmallVectorImpl<std::pair<NamedDecl *, SourceLocation> >::iterator + I = Undefined.begin(), E = Undefined.end(); I != E; ++I) { AddDeclRef(I->first, UndefinedInternals); AddSourceLocation(I->second, UndefinedInternals); } |