From: Chris Lattner Date: Mon, 15 Feb 2010 07:11:34 +0000 (+0000) Subject: give SDValue an operator->, allowing V->isTargetOpcode() and X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9f06cb4fe5214c93cbe68b5359b43891875b30e5;p=oota-llvm.git give SDValue an operator->, allowing V->isTargetOpcode() and many other natural things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96214 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index c8523d81cc7..6ba2d3b24b4 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -821,6 +821,8 @@ public: /// set the SDNode void setNode(SDNode *N) { Node = N; } + inline SDNode *operator->() const { return Node; } + bool operator==(const SDValue &O) const { return Node == O.Node && ResNo == O.ResNo; }