diff options
Diffstat (limited to 'contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r-- | contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGNodes.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGNodes.h index ebf410cc94de..65b06d0f4579 100644 --- a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGNodes.h @@ -935,6 +935,9 @@ public: /// Helper method returns the APInt of a ConstantSDNode operand. inline const APInt &getConstantOperandAPInt(unsigned Num) const; + /// Helper method returns the APInt value of a ConstantSDNode. + inline const APInt &getAsAPIntVal() const; + const SDValue &getOperand(unsigned Num) const { assert(Num < NumOperands && "Invalid child # of SDNode!"); return OperandList[Num]; @@ -1656,6 +1659,10 @@ const APInt &SDNode::getConstantOperandAPInt(unsigned Num) const { return cast<ConstantSDNode>(getOperand(Num))->getAPIntValue(); } +const APInt &SDNode::getAsAPIntVal() const { + return cast<ConstantSDNode>(this)->getAPIntValue(); +} + class ConstantFPSDNode : public SDNode { friend class SelectionDAG; |