mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183016 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ee5e24cb3e
commit
52aaf6a4a9
@ -106,18 +106,15 @@ Value *DwarfEHPrepare::GetExceptionObject(ResumeInst *RI) {
|
||||
/// 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user