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/IR | |
| 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/IR')
| -rw-r--r-- | llvm/lib/IR/LegacyPassManager.cpp | 6 | ||||
| -rw-r--r-- | llvm/lib/IR/Verifier.cpp | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp index 1081f2a1b8c..28fa74cbfda 100644 --- a/llvm/lib/IR/LegacyPassManager.cpp +++ b/llvm/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); } diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index e2fb62fdeef..1c54e9b062e 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -377,8 +377,8 @@ void Verifier::visit(Instruction &I) { void Verifier::visitGlobalValue(const GlobalValue &GV) { - Assert1(!GV.isDeclaration() || GV.isMaterializable() || - GV.hasExternalLinkage() || GV.hasExternalWeakLinkage(), + Assert1(!GV.isDeclaration() || GV.hasExternalLinkage() || + GV.hasExternalWeakLinkage(), "Global is external, but doesn't have external or weak linkage!", &GV); |

