diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-14 01:41:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-14 01:41:15 +0000 |
commit | 1611273351d75b5cbe2a67485bb9831d5916fe26 (patch) | |
tree | 0fa59fecf1480ead468d8c2208a8a95ae2e2e875 /lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
parent | bf2d4c034da3a0109175d1c48c2c898b496a18b9 (diff) |
change EH related stuff (other than EH_LABEL) to use MCSymbol
instead of label ID's. This cleans up and regularizes a bunch
of code and makes way for future progress.
Unfortunately, this pointed out to me that JITDwarfEmitter.cpp
is largely copy and paste from DwarfException/MachineModuleInfo
and other places. This is very sad and disturbing. :(
One major change here is that TidyLandingPads moved from being
called in DwarfException::BeginFunction to being called in
DwarfException::EndFunction. There should not be any
functionality change from doing this, but I'm not an EH expert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98459 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index f4d3c34e68..08ba62b659 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -4302,7 +4302,7 @@ void SelectionDAGBuilder::LowerCallTo(CallSite CS, SDValue Callee, const FunctionType *FTy = cast<FunctionType>(PT->getElementType()); const Type *RetTy = FTy->getReturnType(); MachineModuleInfo *MMI = DAG.getMachineModuleInfo(); - unsigned BeginLabel = 0, EndLabel = 0; + MCSymbol *BeginLabel = 0; TargetLowering::ArgListTy Args; TargetLowering::ArgListEntry Entry; @@ -4362,7 +4362,8 @@ void SelectionDAGBuilder::LowerCallTo(CallSite CS, SDValue Callee, if (LandingPad && MMI) { // Insert a label before the invoke call to mark the try range. This can be // used to detect deletion of the invoke via the MachineModuleInfo. - BeginLabel = MMI->NextLabelID(); + unsigned BeginLabelID = MMI->NextLabelID(); + BeginLabel = MMI->getLabelSym(BeginLabelID); // For SjLj, keep track of which landing pads go with which invokes // so as to maintain the ordering of pads in the LSDA. @@ -4377,7 +4378,7 @@ void SelectionDAGBuilder::LowerCallTo(CallSite CS, SDValue Callee, // this call might not return. (void)getRoot(); DAG.setRoot(DAG.getLabel(ISD::EH_LABEL, getCurDebugLoc(), - getControlRoot(), BeginLabel)); + getControlRoot(), BeginLabelID)); } // Check if target-independent constraints permit a tail call here. @@ -4465,9 +4466,10 @@ void SelectionDAGBuilder::LowerCallTo(CallSite CS, SDValue Callee, if (LandingPad && MMI) { // Insert a label at the end of the invoke call to mark the try range. This // can be used to detect deletion of the invoke via the MachineModuleInfo. - EndLabel = MMI->NextLabelID(); + unsigned EndLabelID = MMI->NextLabelID(); + MCSymbol *EndLabel = MMI->getLabelSym(EndLabelID); DAG.setRoot(DAG.getLabel(ISD::EH_LABEL, getCurDebugLoc(), - getRoot(), EndLabel)); + getRoot(), EndLabelID)); // Inform MachineModuleInfo of range. MMI->addInvoke(LandingPad, BeginLabel, EndLabel); |