aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-03 01:41:34 +0000
committerChris Lattner <sabre@nondot.org>2007-04-03 01:41:34 +0000
commite51f2a59d93336b2be46b9663af317b96a7e045b (patch)
tree82b49babd9289a6486437d756fc5ba715590bf07 /include
parentb2c594f350c13f7faa263dfeba93d81b6ed964e9 (diff)
downloadexternal_llvm-e51f2a59d93336b2be46b9663af317b96a7e045b.zip
external_llvm-e51f2a59d93336b2be46b9663af317b96a7e045b.tar.gz
external_llvm-e51f2a59d93336b2be46b9663af317b96a7e045b.tar.bz2
add a helper function to constantint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Constants.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index a36ac6e..e09fc84 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