diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-16 23:16:33 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-16 23:16:33 +0000 |
commit | 434e95618176ee4eb29237859eb6fa04e3c52e06 (patch) | |
tree | 9e9ad1c9ffba868edee4811937a0703a27b32755 /llvm/lib/LTO/LTOCodeGenerator.cpp | |
parent | bfba572425bd2f88c7ae406efe350c323812643f (diff) | |
download | bcm5719-llvm-434e95618176ee4eb29237859eb6fa04e3c52e06.tar.gz bcm5719-llvm-434e95618176ee4eb29237859eb6fa04e3c52e06.zip |
Change linkInModule to take a std::unique_ptr.
Passing in a std::unique_ptr should help find errors when the module
is used after being linked into another module.
llvm-svn: 255842
Diffstat (limited to 'llvm/lib/LTO/LTOCodeGenerator.cpp')
-rw-r--r-- | llvm/lib/LTO/LTOCodeGenerator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp index 525ca37c2f1..e51366c2930 100644 --- a/llvm/lib/LTO/LTOCodeGenerator.cpp +++ b/llvm/lib/LTO/LTOCodeGenerator.cpp @@ -106,7 +106,7 @@ bool LTOCodeGenerator::addModule(LTOModule *Mod) { assert(&Mod->getModule().getContext() == &Context && "Expected module in same context"); - bool ret = IRLinker->linkInModule(Mod->getModule()); + bool ret = IRLinker->linkInModule(Mod->takeModule()); const std::vector<const char *> &undefs = Mod->getAsmUndefinedRefs(); for (int i = 0, e = undefs.size(); i != e; ++i) |