diff options
author | Justin Lebar <jlebar@google.com> | 2016-10-10 16:26:08 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-10-10 16:26:08 +0000 |
commit | 28f09c50e2f0712c39438b4363361ada90726b39 (patch) | |
tree | fde595734ed6bc062985a8c1ceab037cbe8e1a98 /clang/lib/Serialization/ASTWriter.cpp | |
parent | 11091971567af8a1609a81082eb8cfafaa5d4bda (diff) | |
download | bcm5719-llvm-28f09c50e2f0712c39438b4363361ada90726b39.tar.gz bcm5719-llvm-28f09c50e2f0712c39438b4363361ada90726b39.zip |
[Sema] Use unique_ptr instead of raw pointers in the late-parsed templates map.
Summary:
This is possible now that MapVector supports move-only values.
Depends on D25404.
Reviewers: timshen
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25405
llvm-svn: 283766
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index da513a7076e..335a9320e30 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -4009,14 +4009,14 @@ void ASTWriter::WriteLateParsedTemplates(Sema &SemaRef) { return; RecordData Record; - for (auto LPTMapEntry : LPTMap) { + for (auto &LPTMapEntry : LPTMap) { const FunctionDecl *FD = LPTMapEntry.first; - LateParsedTemplate *LPT = LPTMapEntry.second; + LateParsedTemplate &LPT = *LPTMapEntry.second; AddDeclRef(FD, Record); - AddDeclRef(LPT->D, Record); - Record.push_back(LPT->Toks.size()); + AddDeclRef(LPT.D, Record); + Record.push_back(LPT.Toks.size()); - for (const auto &Tok : LPT->Toks) { + for (const auto &Tok : LPT.Toks) { AddToken(Tok, Record); } } |