From 246c4fb5d91c638b337635821c7d792fe633d602 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 1 Nov 2014 16:46:18 +0000 Subject: Remove redundant calls to isMaterializable. This removes calls to isMaterializable in the following cases: * It was redundant with a call to isDeclaration now that isDeclaration returns the correct answer for materializable functions. * It was followed by a call to Materialize. Just call Materialize and check EC. llvm-svn: 221050 --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 164f4963..9e20ba6 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -3357,10 +3357,8 @@ std::error_code BitcodeReader::MaterializeModule(Module *M) { // disk. for (Module::iterator F = TheModule->begin(), E = TheModule->end(); F != E; ++F) { - if (F->isMaterializable()) { - if (std::error_code EC = materialize(F)) - return EC; - } + if (std::error_code EC = materialize(F)) + return EC; } // At this point, if there are any function bodies, the current bit is // pointing to the END_BLOCK record after them. Now make sure the rest -- cgit v1.1