summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt/opt.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2018-02-14 19:50:40 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2018-02-14 19:50:40 +0000
commit71867532187d45df623b7e4658be7bea06ee3f3e (patch)
tree121bb6657e585c031247f07a939b11e7c0c0c970 /llvm/tools/opt/opt.cpp
parent76064a4b1e7fd1d53cdef12300cb21ceccad3e48 (diff)
downloadbcm5719-llvm-71867532187d45df623b7e4658be7bea06ee3f3e.tar.gz
bcm5719-llvm-71867532187d45df623b7e4658be7bea06ee3f3e.zip
Pass a module reference to CloneModule.
It can never be null and most callers were already using references or std::unique_ptr. llvm-svn: 325160
Diffstat (limited to 'llvm/tools/opt/opt.cpp')
-rw-r--r--llvm/tools/opt/opt.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index 236c9022587..8e839b23907 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/tools/opt/opt.cpp
@@ -765,10 +765,10 @@ int main(int argc, char **argv) {
// If requested, run all passes again with the same pass manager to catch
// bugs caused by persistent state in the passes
if (RunTwice) {
- std::unique_ptr<Module> M2(CloneModule(M.get()));
- Passes.run(*M2);
- CompileTwiceBuffer = Buffer;
- Buffer.clear();
+ std::unique_ptr<Module> M2(CloneModule(*M));
+ Passes.run(*M2);
+ CompileTwiceBuffer = Buffer;
+ Buffer.clear();
}
// Now that we have all of the passes ready, run them.
OpenPOWER on IntegriCloud