diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-11-28 03:56:16 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-11-28 03:56:16 +0000 |
commit | 2a82ca255b0f99f6201a75ed52b91fc024f6e9cf (patch) | |
tree | 00f70fe926c9c2aa20b81c9938cb14780e4faffd /lib/Serialization/ASTWriter.cpp | |
parent | 9d29543284e75648ac89c6e9586fc7cf786cf66f (diff) |
Introduce ASTUnresolvedSet, an UnresolvedSet-like class, whose contents are
allocated using the allocator associated with an ASTContext.
Use this inside CXXRecordDecl::DefinitionData instead of an UnresolvedSet to
avoid a potential memory leak.
rdar://12761275
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | lib/Serialization/ASTWriter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index 744ae9fd81..41665d8969 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -4480,9 +4480,9 @@ ASTWriter::AddTemplateArgumentList(const TemplateArgumentList *TemplateArgs, void -ASTWriter::AddUnresolvedSet(const UnresolvedSetImpl &Set, RecordDataImpl &Record) { +ASTWriter::AddUnresolvedSet(const ASTUnresolvedSet &Set, RecordDataImpl &Record) { Record.push_back(Set.size()); - for (UnresolvedSetImpl::const_iterator + for (ASTUnresolvedSet::const_iterator I = Set.begin(), E = Set.end(); I != E; ++I) { AddDeclRef(I.getDecl(), Record); Record.push_back(I.getAccess()); |