diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-11-01 16:46:18 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-11-01 16:46:18 +0000 |
commit | 246c4fb5d91c638b337635821c7d792fe633d602 (patch) | |
tree | bc5419a4749d4415b7e5a3aa052a38f763cf14bc /llvm/lib/Bitcode/Reader | |
parent | a017974b9aaef2e959f75c644b8b15189e81b3f8 (diff) | |
download | bcm5719-llvm-246c4fb5d91c638b337635821c7d792fe633d602.tar.gz bcm5719-llvm-246c4fb5d91c638b337635821c7d792fe633d602.zip |
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
Diffstat (limited to 'llvm/lib/Bitcode/Reader')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 164f4963394..9e20ba628d3 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 |