summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2018-02-14 21:25:07 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2018-02-14 21:25:07 +0000
commitd702241c98315bd0271b21108a49b56b5b25cbe5 (patch)
tree7ce017fc8b6989eb89dd9b04aaff0342c38b9c79 /llvm/tools
parentb8402ef658ef619823c38b7d31d83bea4bc1b967 (diff)
downloadbcm5719-llvm-d702241c98315bd0271b21108a49b56b5b25cbe5.tar.gz
bcm5719-llvm-d702241c98315bd0271b21108a49b56b5b25cbe5.zip
Use std::uniue_ptr. NFC.
llvm-svn: 325176
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/bugpoint/Miscompilation.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/tools/bugpoint/Miscompilation.cpp b/llvm/tools/bugpoint/Miscompilation.cpp
index 466293b89dc..bdcc1bb3bf9 100644
--- a/llvm/tools/bugpoint/Miscompilation.cpp
+++ b/llvm/tools/bugpoint/Miscompilation.cpp
@@ -501,8 +501,8 @@ ReduceMiscompiledBlocks::TestFuncs(const std::vector<BasicBlock *> &BBs) {
// Split the module into the two halves of the program we want.
ValueToValueMapTy VMap;
- Module *Clone = CloneModule(*BD.getProgram(), VMap).release();
- Module *Orig = BD.swapProgramIn(Clone);
+ std::unique_ptr<Module> Clone = CloneModule(*BD.getProgram(), VMap);
+ std::unique_ptr<Module> Orig(BD.swapProgramIn(Clone.release()));
std::vector<Function *> FuncsOnClone;
std::vector<BasicBlock *> BBsOnClone;
for (unsigned i = 0, e = FunctionsBeingTested.size(); i != e; ++i) {
@@ -524,10 +524,10 @@ ReduceMiscompiledBlocks::TestFuncs(const std::vector<BasicBlock *> &BBs) {
if (std::unique_ptr<Module> New =
BD.extractMappedBlocksFromModule(BBsOnClone, ToOptimize.get())) {
Expected<bool> Ret = TestFn(BD, std::move(New), std::move(ToNotOptimize));
- delete BD.swapProgramIn(Orig);
+ delete BD.swapProgramIn(Orig.release());
return Ret;
}
- delete BD.swapProgramIn(Orig);
+ delete BD.swapProgramIn(Orig.release());
return false;
}
OpenPOWER on IntegriCloud