summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-lto/llvm-lto.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2015-08-24 22:22:53 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2015-08-24 22:22:53 +0000
commit9c8909dbd10900af1bc59e038eb321e05343f276 (patch)
treecc9e674b0bec1f34a10a7c24aa1498591ea4035e /llvm/tools/llvm-lto/llvm-lto.cpp
parentab229c13a65bbec8f3b489ce62d1bbfbfad05bbd (diff)
downloadbcm5719-llvm-9c8909dbd10900af1bc59e038eb321e05343f276.tar.gz
bcm5719-llvm-9c8909dbd10900af1bc59e038eb321e05343f276.zip
LTO: Simplify merged module ownership.
This change moves LTOCodeGenerator's ownership of the merged module to a field of type std::unique_ptr<Module>. This helps simplify parts of the code and clears the way for the module to be consumed by LLVM CodeGen (see D12132 review comments). Differential Revision: http://reviews.llvm.org/D12205 llvm-svn: 245891
Diffstat (limited to 'llvm/tools/llvm-lto/llvm-lto.cpp')
-rw-r--r--llvm/tools/llvm-lto/llvm-lto.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-lto/llvm-lto.cpp b/llvm/tools/llvm-lto/llvm-lto.cpp
index b17f1ea307b..52e45296126 100644
--- a/llvm/tools/llvm-lto/llvm-lto.cpp
+++ b/llvm/tools/llvm-lto/llvm-lto.cpp
@@ -210,7 +210,7 @@ int main(int argc, char **argv) {
// SetMergedModule is true.
if (SetMergedModule && i == BaseArg) {
// Transfer ownership to the code generator.
- CodeGen.setModule(Module.release());
+ CodeGen.setModule(std::move(Module));
} else if (!CodeGen.addModule(Module.get()))
return 1;
}
OpenPOWER on IntegriCloud