[llvm] r183016 - Remove useless code from transitioning to new EH scheme
Kai Nacke
kai.nacke at redstar.de
Fri May 31 09:30:36 PDT 2013
Author: redstar
Date: Fri May 31 11:30:36 2013
New Revision: 183016
URL: http://llvm.org/viewvc/llvm-project?rev=183016&view=rev
Log:
Remove useless code from transitioning to new EH scheme
Removes all uses of the variable UsesNewEH. Simply return false in case that no
resume instructions were found.
Modified:
llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
Modified: llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp?rev=183016&r1=183015&r2=183016&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp Fri May 31 11:30:36 2013
@@ -106,18 +106,15 @@ Value *DwarfEHPrepare::GetExceptionObjec
/// InsertUnwindResumeCalls - Convert the ResumeInsts that are still present
/// into calls to the appropriate _Unwind_Resume function.
bool DwarfEHPrepare::InsertUnwindResumeCalls(Function &Fn) {
- bool UsesNewEH = false;
SmallVector<ResumeInst*, 16> Resumes;
for (Function::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) {
TerminatorInst *TI = I->getTerminator();
if (ResumeInst *RI = dyn_cast<ResumeInst>(TI))
Resumes.push_back(RI);
- else if (InvokeInst *II = dyn_cast<InvokeInst>(TI))
- UsesNewEH = II->getUnwindDest()->isLandingPad();
}
if (Resumes.empty())
- return UsesNewEH;
+ return false;
// Find the rewind function if we didn't already.
if (!RewindFunction) {
More information about the llvm-commits
mailing list