summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/Rewrite
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2015-07-01 04:53:19 +0000
committerJustin Bogner <mail@justinbogner.com>2015-07-01 04:53:19 +0000
commit879d42099927c3d044e88cc672f34ee4ab4b7657 (patch)
treee8773898410a5e11dacf4ce087b9e2e1e6416351 /clang/lib/Frontend/Rewrite
parent0707fd082cd0aa4432f143d17a767e4368482e0c (diff)
downloadbcm5719-llvm-879d42099927c3d044e88cc672f34ee4ab4b7657.tar.gz
bcm5719-llvm-879d42099927c3d044e88cc672f34ee4ab4b7657.zip
-frewrite-includes: Prefer insert to emplace
Some bots didn't like r241140. llvm-svn: 241141
Diffstat (limited to 'clang/lib/Frontend/Rewrite')
-rw-r--r--clang/lib/Frontend/Rewrite/InclusionRewriter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp b/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp
index 6b6a13a02cf..03cc844c390 100644
--- a/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp
+++ b/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp
@@ -148,8 +148,8 @@ void InclusionRewriter::FileChanged(SourceLocation Loc,
// we didn't reach this file (eg: the main file) via an inclusion directive
return;
FileID Id = FullSourceLoc(Loc, SM).getFileID();
- auto P = FileIncludes.emplace(LastInclusionLocation.getRawEncoding(),
- IncludedFile(Id, NewFileType));
+ auto P = FileIncludes.insert(std::make_pair(
+ LastInclusionLocation.getRawEncoding(), IncludedFile(Id, NewFileType)));
assert(P.second && "Unexpected revisitation of the same include directive");
LastInclusionLocation = SourceLocation();
}
@@ -182,7 +182,8 @@ void InclusionRewriter::InclusionDirective(SourceLocation HashLoc,
"Another inclusion directive was found before the previous one "
"was processed");
if (Imported) {
- auto P = ModuleIncludes.emplace(HashLoc.getRawEncoding(), Imported);
+ auto P = ModuleIncludes.insert(
+ std::make_pair(HashLoc.getRawEncoding(), Imported));
assert(P.second && "Unexpected revisitation of the same include directive");
} else
LastInclusionLocation = HashLoc;
OpenPOWER on IntegriCloud