mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
change the LabelSDNode to be EHLabelSDNode and make it hold
an MCSymbol. Make the EH_LABEL MachineInstr hold its label with an MCSymbol instead of ID. Fix a bug in MMI.cpp which would return labels named "Label4" instead of "label4". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98463 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -228,7 +228,7 @@ public:
|
||||
|
||||
/// addLandingPad - Add a new panding pad. Returns the label ID for the
|
||||
/// landing pad entry.
|
||||
unsigned addLandingPad(MachineBasicBlock *LandingPad);
|
||||
MCSymbol *addLandingPad(MachineBasicBlock *LandingPad);
|
||||
|
||||
/// addPersonality - Provide the personality function for the exception
|
||||
/// information.
|
||||
|
||||
@@ -383,8 +383,7 @@ public:
|
||||
unsigned char TargetFlags = 0);
|
||||
SDValue getValueType(EVT);
|
||||
SDValue getRegister(unsigned Reg, EVT VT);
|
||||
SDValue getLabel(unsigned Opcode, DebugLoc dl, SDValue Root,
|
||||
unsigned LabelID);
|
||||
SDValue getEHLabel(DebugLoc dl, SDValue Root, MCSymbol *Label);
|
||||
SDValue getBlockAddress(BlockAddress *BA, EVT VT,
|
||||
bool isTarget = false, unsigned char TargetFlags = 0);
|
||||
|
||||
|
||||
@@ -274,7 +274,6 @@ private:
|
||||
// Calls to these functions are generated by tblgen.
|
||||
SDNode *Select_INLINEASM(SDNode *N);
|
||||
SDNode *Select_UNDEF(SDNode *N);
|
||||
SDNode *Select_EH_LABEL(SDNode *N);
|
||||
void CannotYetSelect(SDNode *N);
|
||||
|
||||
private:
|
||||
|
||||
@@ -40,6 +40,7 @@ class MachineBasicBlock;
|
||||
class MachineConstantPoolValue;
|
||||
class SDNode;
|
||||
class Value;
|
||||
class MCSymbol;
|
||||
template <typename T> struct DenseMapInfo;
|
||||
template <typename T> struct simplify_type;
|
||||
template <typename T> struct ilist_traits;
|
||||
@@ -2088,18 +2089,18 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class LabelSDNode : public SDNode {
|
||||
class EHLabelSDNode : public SDNode {
|
||||
SDUse Chain;
|
||||
unsigned LabelID;
|
||||
MCSymbol *Label;
|
||||
friend class SelectionDAG;
|
||||
LabelSDNode(unsigned NodeTy, DebugLoc dl, SDValue ch, unsigned id)
|
||||
: SDNode(NodeTy, dl, getSDVTList(MVT::Other)), LabelID(id) {
|
||||
EHLabelSDNode(DebugLoc dl, SDValue ch, MCSymbol *L)
|
||||
: SDNode(ISD::EH_LABEL, dl, getSDVTList(MVT::Other)), Label(L) {
|
||||
InitOperands(&Chain, ch);
|
||||
}
|
||||
public:
|
||||
unsigned getLabelID() const { return LabelID; }
|
||||
MCSymbol *getLabel() const { return Label; }
|
||||
|
||||
static bool classof(const LabelSDNode *) { return true; }
|
||||
static bool classof(const EHLabelSDNode *) { return true; }
|
||||
static bool classof(const SDNode *N) {
|
||||
return N->getOpcode() == ISD::EH_LABEL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user