summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-10-10 00:04:29 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-10-10 00:04:29 +0000
commitbfa5b98201dc9c793a48e5a713a2159ed96e72eb (patch)
treeea7821223611528ed49fddecf40ca2a33402c868 /llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
parentf363ed9804e72982b673ff36ef1f1450a1774ba1 (diff)
downloadbcm5719-llvm-bfa5b98201dc9c793a48e5a713a2159ed96e72eb.tar.gz
bcm5719-llvm-bfa5b98201dc9c793a48e5a713a2159ed96e72eb.zip
[WinEH] Remove more dead code
wineh-parent is dead, so is ValueOrMBB. llvm-svn: 249920
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
index d9b32d92c8e..b0d81030931 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
@@ -285,15 +285,14 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
// Calculate state numbers if we haven't already.
WinEHFuncInfo &EHInfo = MMI.getWinEHFuncInfo(&fn);
- const Function *WinEHParentFn = MMI.getWinEHParent(&fn);
if (Personality == EHPersonality::MSVC_CXX)
- calculateWinCXXEHStateNumbers(WinEHParentFn, EHInfo);
+ calculateWinCXXEHStateNumbers(&fn, EHInfo);
else if (isAsynchronousEHPersonality(Personality))
- calculateSEHStateNumbers(WinEHParentFn, EHInfo);
+ calculateSEHStateNumbers(&fn, EHInfo);
else if (Personality == EHPersonality::CoreCLR)
- calculateClrEHStateNumbers(WinEHParentFn, EHInfo);
+ calculateClrEHStateNumbers(&fn, EHInfo);
- calculateCatchReturnSuccessorColors(WinEHParentFn, EHInfo);
+ calculateCatchReturnSuccessorColors(&fn, EHInfo);
// Map all BB references in the WinEH data to MBBs.
for (WinEHTryBlockMapEntry &TBME : EHInfo.TryBlockMap) {
@@ -304,14 +303,13 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
} else {
H.CatchObj.FrameIndex = INT_MAX;
}
- if (const auto *BB = dyn_cast<BasicBlock>(H.Handler.get<const Value *>()))
- H.Handler = MBBMap[BB];
+ if (H.Handler)
+ H.Handler = MBBMap[H.Handler.get<const BasicBlock *>()];
}
}
for (CxxUnwindMapEntry &UME : EHInfo.CxxUnwindMap)
if (UME.Cleanup)
- if (const auto *BB = dyn_cast<BasicBlock>(UME.Cleanup.get<const Value *>()))
- UME.Cleanup = MBBMap[BB];
+ UME.Cleanup = MBBMap[UME.Cleanup.get<const BasicBlock *>()];
for (SEHUnwindMapEntry &UME : EHInfo.SEHUnwindMap) {
const BasicBlock *BB = UME.Handler.get<const BasicBlock *>();
UME.Handler = MBBMap[BB];
OpenPOWER on IntegriCloud