[PATCH] D23600: [LTO] Stop always creating and running an LTO compilation if there is not a single LTO object
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 17 08:33:01 PDT 2016
tejohnson added a comment.
Giving this a try, but in the meantime there are a couple fixes needed to get the compile to succeed, noted below.
================
Comment at: lib/LTO/LTO.cpp:307
@@ -307,3 +306,3 @@
ArrayRef<SymbolResolution> Res) {
- RegularLTO.HasModule = true;
-
+ if (!CombinedModule) {
+ CombinedModule = llvm::make_unique<Module>("ld-temp.o", Ctx);
----------------
CombinedModule, Mover and Ctx need to all be prefixed with "RegularLTO." in this block of code.
================
Comment at: lib/LTO/LTO.cpp:357
@@ -355,3 +356,3 @@
return RegularLTO.Mover.move(Obj->takeModule(), Keep,
[](GlobalValue &, IRMover::ValueAdder) {});
----------------
Mover is now a pointer.
https://reviews.llvm.org/D23600
More information about the llvm-commits
mailing list