From e51f2a59d93336b2be46b9663af317b96a7e045b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 3 Apr 2007 01:41:34 +0000 Subject: [PATCH] add a helper function to constantint. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35610 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Constants.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index a36ac6e7474..e09fc84c929 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -52,6 +52,9 @@ public: inline const APInt& getValue() const { return Val; } + + /// getBitWidth - Return the bitwidth of this constant. + unsigned getBitWidth() const { return Val.getBitWidth(); } /// Return the constant as a 64-bit unsigned integer value after it /// has been zero extended as appropriate for the type of this constant. Note