Changes in directory llvm/lib/VMCore:
Constants.cpp updated: 1.224 -> 1.225 --- 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.cpp | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/lib/VMCore/Constants.cpp diff -u llvm/lib/VMCore/Constants.cpp:1.224 llvm/lib/VMCore/Constants.cpp:1.225 --- llvm/lib/VMCore/Constants.cpp:1.224 Tue Feb 27 17:27:26 2007 +++ llvm/lib/VMCore/Constants.cpp Wed Feb 28 13:50:21 2007 @@ -216,6 +216,10 @@ return Slot = new ConstantInt(ITy, V); } +ConstantInt *ConstantInt::get(const APInt &V) { + return ConstantInt::get(IntegerType::get(V.getBitWidth()), V); +} + //===----------------------------------------------------------------------===// // ConstantFP //===----------------------------------------------------------------------===// _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits