aboutsummaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2013-01-31 03:23:57 +0000
committerNick Lewycky <nicholas@mxc.ca>2013-01-31 03:23:57 +0000
commit995e26b0523ac8e3b6199a509b871b81fa5df6ee (patch)
tree42600caca2fde2e41f41eb3fc9dfffb575128f2a /lib/Serialization/ASTWriter.cpp
parent869709c06eefd1d756ae4290646d4412103697bd (diff)
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? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriter.cpp')
-rw-r--r--lib/Serialization/ASTWriter.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp
index 25e3d52f37..8120799c11 100644
--- a/lib/Serialization/ASTWriter.cpp
+++ b/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);
}