mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-23 17:32:49 +00:00
Remove the implicit conversion from SDOperandPtr to SDOperand*; this
may fix a build error on Visual Studio. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49876 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9d1a81a23c
commit
35b31bea0d
@ -968,6 +968,8 @@ class SDOperandPtr {
|
|||||||
const SDOperand *ptr; // The pointer to the SDOperand object
|
const SDOperand *ptr; // The pointer to the SDOperand object
|
||||||
int object_size; // The size of the object containg the SDOperand
|
int object_size; // The size of the object containg the SDOperand
|
||||||
public:
|
public:
|
||||||
|
SDOperandPtr() : ptr(0), object_size(0) {}
|
||||||
|
|
||||||
SDOperandPtr(SDUse * use_ptr) {
|
SDOperandPtr(SDUse * use_ptr) {
|
||||||
ptr = &use_ptr->getSDOperand();
|
ptr = &use_ptr->getSDOperand();
|
||||||
object_size = sizeof(SDUse);
|
object_size = sizeof(SDUse);
|
||||||
@ -978,12 +980,6 @@ public:
|
|||||||
object_size = sizeof(SDOperand);
|
object_size = sizeof(SDOperand);
|
||||||
}
|
}
|
||||||
|
|
||||||
operator const SDOperand *() const {
|
|
||||||
assert(object_size == sizeof(SDOperand) &&
|
|
||||||
"Only SDOperand can be converted");
|
|
||||||
return ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
const SDOperand operator *() { return *ptr; }
|
const SDOperand operator *() { return *ptr; }
|
||||||
const SDOperand *operator ->() { return ptr; }
|
const SDOperand *operator ->() { return ptr; }
|
||||||
SDOperandPtr operator ++ () {
|
SDOperandPtr operator ++ () {
|
||||||
@ -1300,7 +1296,7 @@ protected:
|
|||||||
/// opcode, types, and operands to the specified value. This should only be
|
/// opcode, types, and operands to the specified value. This should only be
|
||||||
/// used by the SelectionDAG class.
|
/// used by the SelectionDAG class.
|
||||||
void MorphNodeTo(unsigned Opc, SDVTList L,
|
void MorphNodeTo(unsigned Opc, SDVTList L,
|
||||||
const SDOperand *Ops, unsigned NumOps);
|
SDOperandPtr Ops, unsigned NumOps);
|
||||||
|
|
||||||
void addUser(unsigned i, SDNode *User) {
|
void addUser(unsigned i, SDNode *User) {
|
||||||
assert(User->OperandList[i].getUser() && "Node without parent");
|
assert(User->OperandList[i].getUser() && "Node without parent");
|
||||||
|
@ -337,7 +337,7 @@ static void AddNodeIDOperands(FoldingSetNodeID &ID,
|
|||||||
|
|
||||||
static void AddNodeIDNode(FoldingSetNodeID &ID,
|
static void AddNodeIDNode(FoldingSetNodeID &ID,
|
||||||
unsigned short OpC, SDVTList VTList,
|
unsigned short OpC, SDVTList VTList,
|
||||||
const SDOperand *OpList, unsigned N) {
|
SDOperandPtr OpList, unsigned N) {
|
||||||
AddNodeIDOpcode(ID, OpC);
|
AddNodeIDOpcode(ID, OpC);
|
||||||
AddNodeIDValueTypes(ID, VTList);
|
AddNodeIDValueTypes(ID, VTList);
|
||||||
AddNodeIDOperands(ID, OpList, N);
|
AddNodeIDOperands(ID, OpList, N);
|
||||||
@ -3342,7 +3342,7 @@ UpdateNodeOperands(SDOperand InN, SDOperandPtr Ops, unsigned NumOps) {
|
|||||||
/// opcode, types, and operands to the specified value. This should only be
|
/// opcode, types, and operands to the specified value. This should only be
|
||||||
/// used by the SelectionDAG class.
|
/// used by the SelectionDAG class.
|
||||||
void SDNode::MorphNodeTo(unsigned Opc, SDVTList L,
|
void SDNode::MorphNodeTo(unsigned Opc, SDVTList L,
|
||||||
const SDOperand *Ops, unsigned NumOps) {
|
SDOperandPtr Ops, unsigned NumOps) {
|
||||||
NodeType = Opc;
|
NodeType = Opc;
|
||||||
ValueList = L.VTs;
|
ValueList = L.VTs;
|
||||||
NumValues = L.NumVTs;
|
NumValues = L.NumVTs;
|
||||||
@ -3393,7 +3393,7 @@ SDNode *SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
|
|||||||
|
|
||||||
RemoveNodeFromCSEMaps(N);
|
RemoveNodeFromCSEMaps(N);
|
||||||
|
|
||||||
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc, VTs, 0, 0);
|
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc, VTs, SDOperandPtr(), 0);
|
||||||
|
|
||||||
CSEMap.InsertNode(N, IP);
|
CSEMap.InsertNode(N, IP);
|
||||||
return N;
|
return N;
|
||||||
@ -3951,7 +3951,7 @@ void AtomicSDNode::ANCHOR() {}
|
|||||||
|
|
||||||
HandleSDNode::~HandleSDNode() {
|
HandleSDNode::~HandleSDNode() {
|
||||||
SDVTList VTs = { 0, 0 };
|
SDVTList VTs = { 0, 0 };
|
||||||
MorphNodeTo(ISD::HANDLENODE, VTs, 0, 0); // Drops operand uses.
|
MorphNodeTo(ISD::HANDLENODE, VTs, SDOperandPtr(), 0); // Drops operand uses.
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalAddressSDNode::GlobalAddressSDNode(bool isTarget, const GlobalValue *GA,
|
GlobalAddressSDNode::GlobalAddressSDNode(bool isTarget, const GlobalValue *GA,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user