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 | 5793838fc8efac8ffbdc71e49d287ddec8a4f749 (patch) | |
tree | 2f44096939c47746d5d1495514f650fefd9803b6 /lib/IR/LegacyPassManager.cpp | |
parent | e2add4346d8f1f355896e99d0d5addf196de5b0e (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221050 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/LegacyPassManager.cpp')
-rw-r--r-- | lib/IR/LegacyPassManager.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/IR/LegacyPassManager.cpp b/lib/IR/LegacyPassManager.cpp index 1081f2a1b8c..28fa74cbfda 100644 --- a/lib/IR/LegacyPassManager.cpp +++ b/lib/IR/LegacyPassManager.cpp @@ -1403,10 +1403,8 @@ void FunctionPassManager::add(Pass *P) { /// so, return true. /// bool FunctionPassManager::run(Function &F) { - if (F.isMaterializable()) { - if (std::error_code EC = F.materialize()) - report_fatal_error("Error reading bitcode file: " + EC.message()); - } + if (std::error_code EC = F.materialize()) + report_fatal_error("Error reading bitcode file: " + EC.message()); return FPM->run(F); } |