[PATCH] D146598: [Constant] Inline ConstantInt::getSigned
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 22 09:32:15 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG83e420c65f4a: [Constant] Inline ConstantInt::getSigned (authored by craig.topper).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146598/new/
https://reviews.llvm.org/D146598
Files:
llvm/include/llvm/IR/Constants.h
llvm/lib/IR/Constants.cpp
Index: llvm/lib/IR/Constants.cpp
===================================================================
--- llvm/lib/IR/Constants.cpp
+++ 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() &&
Index: llvm/include/llvm/IR/Constants.h
===================================================================
--- llvm/include/llvm/IR/Constants.h
+++ 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146598.507400.patch
Type: text/x-patch
Size: 1434 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230322/cd9dd8b3/attachment.bin>
More information about the llvm-commits
mailing list