diff --git a/llvm/include/llvm/IR/Constants.h b/llvm/include/llvm/IR/Constants.h --- a/llvm/include/llvm/IR/Constants.h +++ b/llvm/include/llvm/IR/Constants.h @@ -111,8 +111,12 @@ /// either getSExtValue() or getZExtValue() will yield a correctly sized and /// signed value for the type Ty. /// Get a ConstantInt for a specific signed value. - static ConstantInt *getSigned(IntegerType *Ty, int64_t V); - static Constant *getSigned(Type *Ty, int64_t V); + static ConstantInt *getSigned(IntegerType *Ty, int64_t V) { + return get(Ty, V, true); + } + static Constant *getSigned(Type *Ty, int64_t V) { + return get(Ty, V, true); + } /// 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. diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp --- a/llvm/lib/IR/Constants.cpp +++ b/llvm/lib/IR/Constants.cpp @@ -899,14 +899,6 @@ return get(Ty->getContext(), APInt(Ty->getBitWidth(), V, isSigned)); } -ConstantInt *ConstantInt::getSigned(IntegerType *Ty, int64_t V) { - return get(Ty, V, true); -} - -Constant *ConstantInt::getSigned(Type *Ty, int64_t V) { - return get(Ty, V, true); -} - Constant *ConstantInt::get(Type *Ty, const APInt& V) { ConstantInt *C = get(Ty->getContext(), V); assert(C->getType() == Ty->getScalarType() &&