aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/SelectionDAGNodes.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-04-17 23:02:12 +0000
committerDan Gohman <gohman@apple.com>2008-04-17 23:02:12 +0000
commit35b31bea0dc9e16d4c384a6a78404bdd791b6693 (patch)
tree10699103a7f86bf02d2cb86a58bfb39735a084e5 /include/llvm/CodeGen/SelectionDAGNodes.h
parent9d1a81a23ca4281ad0f777e831d2454a4f88e771 (diff)
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
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");