diff options
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/bugpoint/CrashDebugger.cpp | 3 | ||||
| -rw-r--r-- | llvm/tools/bugpoint/Miscompilation.cpp | 12 | ||||
| -rw-r--r-- | llvm/tools/lli/OrcLazyJIT.h | 3 | ||||
| -rw-r--r-- | llvm/tools/llvm-cov/CodeCoverage.cpp | 3 | ||||
| -rw-r--r-- | llvm/tools/llvm-pdbdump/LinePrinter.h | 2 |
5 files changed, 8 insertions, 15 deletions
diff --git a/llvm/tools/bugpoint/CrashDebugger.cpp b/llvm/tools/bugpoint/CrashDebugger.cpp index 6f41d3030d0..e2aaf6b01fc 100644 --- a/llvm/tools/bugpoint/CrashDebugger.cpp +++ b/llvm/tools/bugpoint/CrashDebugger.cpp @@ -385,8 +385,7 @@ bool ReduceCrashingBlocks::TestBlocks(std::vector<const BasicBlock*> &BBs) { std::vector<std::pair<std::string, std::string> > BlockInfo; for (BasicBlock *BB : Blocks) - BlockInfo.push_back(std::make_pair(BB->getParent()->getName(), - BB->getName())); + BlockInfo.emplace_back(BB->getParent()->getName(), BB->getName()); // Now run the CFG simplify pass on the function... std::vector<std::string> Passes; diff --git a/llvm/tools/bugpoint/Miscompilation.cpp b/llvm/tools/bugpoint/Miscompilation.cpp index 53631d25c39..fad16368698 100644 --- a/llvm/tools/bugpoint/Miscompilation.cpp +++ b/llvm/tools/bugpoint/Miscompilation.cpp @@ -386,10 +386,8 @@ static bool ExtractLoops(BugDriver &BD, // that masked the error. Stop loop extraction now. std::vector<std::pair<std::string, FunctionType*> > MisCompFunctions; - for (unsigned i = 0, e = MiscompiledFunctions.size(); i != e; ++i) { - Function *F = MiscompiledFunctions[i]; - MisCompFunctions.push_back(std::make_pair(F->getName(), - F->getFunctionType())); + for (Function *F : MiscompiledFunctions) { + MisCompFunctions.emplace_back(F->getName(), F->getFunctionType()); } if (Linker::LinkModules(ToNotOptimize, ToOptimizeLoopExtracted)) @@ -414,8 +412,7 @@ static bool ExtractLoops(BugDriver &BD, for (Module::iterator I = ToOptimizeLoopExtracted->begin(), E = ToOptimizeLoopExtracted->end(); I != E; ++I) if (!I->isDeclaration()) - MisCompFunctions.push_back(std::make_pair(I->getName(), - I->getFunctionType())); + MisCompFunctions.emplace_back(I->getName(), I->getFunctionType()); // Okay, great! Now we know that we extracted a loop and that loop // extraction both didn't break the program, and didn't mask the problem. @@ -596,8 +593,7 @@ static bool ExtractBlocks(BugDriver &BD, for (Module::iterator I = Extracted->begin(), E = Extracted->end(); I != E; ++I) if (!I->isDeclaration()) - MisCompFunctions.push_back(std::make_pair(I->getName(), - I->getFunctionType())); + MisCompFunctions.emplace_back(I->getName(), I->getFunctionType()); if (Linker::LinkModules(ProgClone, Extracted.get())) exit(1); diff --git a/llvm/tools/lli/OrcLazyJIT.h b/llvm/tools/lli/OrcLazyJIT.h index bff2eca26a5..c4a12b6dd9e 100644 --- a/llvm/tools/lli/OrcLazyJIT.h +++ b/llvm/tools/lli/OrcLazyJIT.h @@ -116,8 +116,7 @@ public: orc::CtorDtorRunner<CODLayerT> CtorRunner(std::move(CtorNames), H); CtorRunner.runViaLayer(CODLayer); - IRStaticDestructorRunners.push_back( - orc::CtorDtorRunner<CODLayerT>(std::move(DtorNames), H)); + IRStaticDestructorRunners.emplace_back(std::move(DtorNames), H); return H; } diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp index f85f3b13b67..4ff53301881 100644 --- a/llvm/tools/llvm-cov/CodeCoverage.cpp +++ b/llvm/tools/llvm-cov/CodeCoverage.cpp @@ -116,8 +116,7 @@ CodeCoverageTool::getSourceFile(StringRef SourceFile) { error(EC.message(), SourceFile); return EC; } - LoadedSourceFiles.push_back( - std::make_pair(SourceFile, std::move(Buffer.get()))); + LoadedSourceFiles.emplace_back(SourceFile, std::move(Buffer.get())); return *LoadedSourceFiles.back().second; } diff --git a/llvm/tools/llvm-pdbdump/LinePrinter.h b/llvm/tools/llvm-pdbdump/LinePrinter.h index c2a3ab60d90..b985e934190 100644 --- a/llvm/tools/llvm-pdbdump/LinePrinter.h +++ b/llvm/tools/llvm-pdbdump/LinePrinter.h @@ -41,7 +41,7 @@ private: void SetFilters(std::list<Regex> &List, Iter Begin, Iter End) { List.clear(); for (; Begin != End; ++Begin) - List.push_back(StringRef(*Begin)); + List.emplace_back(StringRef(*Begin)); } raw_ostream &OS; |

