Simplify LTOModule::makeLTOModule a bit. NFC.
Just call parseBitcodeFile instead of getLazyBitcodeModule followed by
materializeAllPermanently.
llvm-svn: 216461
diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp
index d9bc939..f9d270d 100644
--- a/llvm/lib/LTO/LTOModule.cpp
+++ b/llvm/lib/LTO/LTOModule.cpp
@@ -119,8 +119,7 @@
if (!MemBuf)
return nullptr;
- ErrorOr<Module *> MOrErr =
- getLazyBitcodeModule(MemBuf.get(), getGlobalContext());
+ ErrorOr<Module *> MOrErr = parseBitcodeFile(MemBuf.get(), getGlobalContext());
if (std::error_code EC = MOrErr.getError()) {
errMsg = EC.message();
return nullptr;
@@ -154,7 +153,6 @@
TargetMachine *target = march->createTargetMachine(TripleStr, CPU, FeatureStr,
options);
- M->materializeAllPermanently(true);
M->setDataLayout(target->getSubtargetImpl()->getDataLayout());
std::unique_ptr<object::IRObjectFile> IRObj(