From: Rafael Espindola Date: Tue, 26 Aug 2014 15:09:32 +0000 (+0000) Subject: Simplify LTOModule::makeLTOModule a bit. NFC. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=85ae5fc082eb98b9a4d6ec7a7adf3a2f0b17c567;p=oota-llvm.git Simplify LTOModule::makeLTOModule a bit. NFC. Just call parseBitcodeFile instead of getLazyBitcodeModule followed by materializeAllPermanently. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216461 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/LTO/LTOModule.cpp b/lib/LTO/LTOModule.cpp index d9bc9394d46..f9d270d3207 100644 --- a/lib/LTO/LTOModule.cpp +++ b/lib/LTO/LTOModule.cpp @@ -119,8 +119,7 @@ LTOModule *LTOModule::makeLTOModule(MemoryBufferRef Buffer, if (!MemBuf) return nullptr; - ErrorOr MOrErr = - getLazyBitcodeModule(MemBuf.get(), getGlobalContext()); + ErrorOr MOrErr = parseBitcodeFile(MemBuf.get(), getGlobalContext()); if (std::error_code EC = MOrErr.getError()) { errMsg = EC.message(); return nullptr; @@ -154,7 +153,6 @@ LTOModule *LTOModule::makeLTOModule(MemoryBufferRef Buffer, TargetMachine *target = march->createTargetMachine(TripleStr, CPU, FeatureStr, options); - M->materializeAllPermanently(true); M->setDataLayout(target->getSubtargetImpl()->getDataLayout()); std::unique_ptr IRObj(