[llvm] [SelectionDAG] Add and use SDNode::getAsAPIntVal() helper (PR #77455)

Alex Bradbury via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 9 04:47:28 PST 2024


================
@@ -932,6 +932,9 @@ END_TWO_BYTE_PACK()
   /// 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;
+
----------------
asb wrote:

The definition of ConstantSDNode doesn't come until later in the file, and this matches the approach used by the neighbouring getters.

https://github.com/llvm/llvm-project/pull/77455


More information about the llvm-commits mailing list