diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-02-14 20:25:18 +0000 | 
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-02-14 20:25:18 +0000 | 
| commit | 19d8655ce4de19bfe5474ab1a9748eed11e22b3c (patch) | |
| tree | 567e90f68f1bb63d42b1819be56be368a1f0c0c9 /llvm/tools | |
| parent | afad84e676123a4cdeffeed0062c8449c38bc6e3 (diff) | |
| download | bcm5719-llvm-19d8655ce4de19bfe5474ab1a9748eed11e22b3c.tar.gz bcm5719-llvm-19d8655ce4de19bfe5474ab1a9748eed11e22b3c.zip | |
Use std::unique_ptr. NFC.
llvm-svn: 325167
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/bugpoint/CrashDebugger.cpp | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/llvm/tools/bugpoint/CrashDebugger.cpp b/llvm/tools/bugpoint/CrashDebugger.cpp index bd542aa0ca7..1548d4d1442 100644 --- a/llvm/tools/bugpoint/CrashDebugger.cpp +++ b/llvm/tools/bugpoint/CrashDebugger.cpp @@ -700,7 +700,7 @@ bool ReduceCrashingInstructions::TestInsts(      std::vector<const Instruction *> &Insts) {    // Clone the program to try hacking it apart...    ValueToValueMapTy VMap; -  Module *M = CloneModule(*BD.getProgram(), VMap).release(); +  std::unique_ptr<Module> M = CloneModule(*BD.getProgram(), VMap);    // Convert list to set for fast lookup...    SmallPtrSet<Instruction *, 32> Instructions; @@ -734,8 +734,8 @@ bool ReduceCrashingInstructions::TestInsts(    Passes.run(*M);    // Try running on the hacked up program... -  if (TestFn(BD, M)) { -    BD.setNewProgram(M); // It crashed, keep the trimmed version... +  if (TestFn(BD, M.get())) { +    BD.setNewProgram(M.release()); // It crashed, keep the trimmed version...      // Make sure to use instruction pointers that point into the now-current      // module, and that they don't include any deleted blocks. @@ -744,7 +744,7 @@ bool ReduceCrashingInstructions::TestInsts(        Insts.push_back(Inst);      return true;    } -  delete M; // It didn't crash, try something else. +  // It didn't crash, try something else.    return false;  } | 

