diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-08-04 20:55:59 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-08-04 20:55:59 +0000 |
commit | b8a45c9fe9a3044311741e16d39a89aa7fc98000 (patch) | |
tree | 2e3a691daafbf5c520f498dee43a43185593dfd9 /include | |
parent | a40cbb3b7e737466df3e97d97e16f6b22ffffeef (diff) | |
download | external_llvm-b8a45c9fe9a3044311741e16d39a89aa7fc98000.zip external_llvm-b8a45c9fe9a3044311741e16d39a89aa7fc98000.tar.gz external_llvm-b8a45c9fe9a3044311741e16d39a89aa7fc98000.tar.bz2 |
Add function GetConstantValueAsUnsignedInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/InstrSelectionSupport.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/InstrSelectionSupport.h b/include/llvm/CodeGen/InstrSelectionSupport.h index adfad6b..3f41fb4 100644 --- a/include/llvm/CodeGen/InstrSelectionSupport.h +++ b/include/llvm/CodeGen/InstrSelectionSupport.h @@ -21,11 +21,13 @@ class TargetMachine; //--------------------------------------------------------------------------- +// Function GetConstantValueAsUnsignedInt // Function GetConstantValueAsSignedInt // -// Convenience function to get the value of an integer constant, for an -// appropriate integer or non-integer type that can be held in an integer. -// The type of the argument must be the following: +// Convenience functions to get the value of an integer constant, for an +// appropriate integer or non-integer type that can be held in a signed +// or unsigned integer respectively. The type of the argument must be +// the following: // Signed or unsigned integer // Boolean // Pointer @@ -33,6 +35,9 @@ class TargetMachine; // isValidConstant is set to true if a valid constant was found. //--------------------------------------------------------------------------- +uint64_t GetConstantValueAsUnsignedInt (const Value *V, + bool &isValidConstant); + int64_t GetConstantValueAsSignedInt (const Value *V, bool &isValidConstant); |