From 85ae5fc082eb98b9a4d6ec7a7adf3a2f0b17c567 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 26 Aug 2014 15:09:32 +0000 Subject: [PATCH] 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 --- lib/LTO/LTOModule.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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( -- 2.34.1