diff options
Diffstat (limited to 'llvm/lib/VMCore/Constants.cpp')
| -rw-r--r-- | llvm/lib/VMCore/Constants.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp index 37e0abec988..29f096364f4 100644 --- a/llvm/lib/VMCore/Constants.cpp +++ b/llvm/lib/VMCore/Constants.cpp @@ -216,6 +216,10 @@ ConstantInt *ConstantInt::get(const Type *Ty, const APInt& V) { return Slot = new ConstantInt(ITy, V); } +ConstantInt *ConstantInt::get(const APInt &V) { + return ConstantInt::get(IntegerType::get(V.getBitWidth()), V); +} + //===----------------------------------------------------------------------===// // ConstantFP //===----------------------------------------------------------------------===// |

