aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/SelectionDAGNodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index a1c1ec9f15..ce84ed00b1 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -968,6 +968,8 @@ class SDOperandPtr {
const SDOperand *ptr; // The pointer to the SDOperand object
int object_size; // The size of the object containg the SDOperand
public:
+ SDOperandPtr() : ptr(0), object_size(0) {}
+
SDOperandPtr(SDUse * use_ptr) {
ptr = &use_ptr->getSDOperand();
object_size = sizeof(SDUse);
@@ -978,12 +980,6 @@ public:
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; }
SDOperandPtr operator ++ () {
@@ -1300,7 +1296,7 @@ protected:
/// opcode, types, and operands to the specified value. This should only be
/// used by the SelectionDAG class.
void MorphNodeTo(unsigned Opc, SDVTList L,
- const SDOperand *Ops, unsigned NumOps);
+ SDOperandPtr Ops, unsigned NumOps);
void addUser(unsigned i, SDNode *User) {
assert(User->OperandList[i].getUser() && "Node without parent");