diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-04-03 01:41:34 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-04-03 01:41:34 +0000 |
| commit | 6b3ff17c7040f4591d4561c725b70fd4e646d674 (patch) | |
| tree | 0b8750d415e5922ab863c42af860bc6ae0f48460 /llvm | |
| parent | f742e2fe70ffc48be0a5457ac67b3131a9c0096c (diff) | |
| download | bcm5719-llvm-6b3ff17c7040f4591d4561c725b70fd4e646d674.tar.gz bcm5719-llvm-6b3ff17c7040f4591d4561c725b70fd4e646d674.zip | |
add a helper function to constantint.
llvm-svn: 35610
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/Constants.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/include/llvm/Constants.h b/llvm/include/llvm/Constants.h index a36ac6e7474..e09fc84c929 100644 --- a/llvm/include/llvm/Constants.h +++ b/llvm/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 |

