From: Justin Bogner Date: Wed, 1 Jul 2015 04:53:19 +0000 (+0000) Subject: -frewrite-includes: Prefer insert to emplace X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db0af41dc258f02c6c308e7dfeea8284644b2910;p=clang -frewrite-includes: Prefer insert to emplace Some bots didn't like r241140. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241141 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/Rewrite/InclusionRewriter.cpp b/lib/Frontend/Rewrite/InclusionRewriter.cpp index 6b6a13a02c..03cc844c39 100644 --- a/lib/Frontend/Rewrite/InclusionRewriter.cpp +++ b/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;