[llvm-commits] CVS: llvm/include/llvm/Constants.h
Reid Spencer
reid at x10sys.com
Wed Feb 28 11:50:40 PST 2007
Changes in directory llvm/include/llvm:
Constants.h updated: 1.133 -> 1.134
---
Log message:
Implement a convenience method to construct a ConstantInt directly from an
APInt. The implied type is the integer type that corresponds to the bit
width of the APInt.
---
Diffs of the changes: (+4 -0)
Constants.h | 4 ++++
1 files changed, 4 insertions(+)
Index: llvm/include/llvm/Constants.h
diff -u llvm/include/llvm/Constants.h:1.133 llvm/include/llvm/Constants.h:1.134
--- llvm/include/llvm/Constants.h:1.133 Mon Feb 26 17:54:03 2007
+++ llvm/include/llvm/Constants.h Wed Feb 28 13:50:21 2007
@@ -97,6 +97,10 @@
static ConstantInt *get(const Type *Ty, int64_t V);
static ConstantInt *get(const Type *Ty, const APInt& V);
+ /// Return a ConstantInt with the specified value and an implied Type. The
+ /// type is the integer type that corresponds to the bit width of the value.
+ static ConstantInt *get(const APInt &V);
+
/// getType - Specialize the getType() method to always return an IntegerType,
/// which reduces the amount of casting needed in parts of the compiler.
///
More information about the llvm-commits
mailing list