aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Value.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2023-01-11 16:34:43 +0000
committerGuillaume Chatelet <gchatelet@google.com>2023-01-11 16:36:39 +0000
commit48f5d77eeed4d7453d199c4b4ac16c1bbfbdbddf (patch)
tree86f5b6a24a773b4632211ba76f22c3b59823e9d9 /llvm/lib/IR/Value.cpp
parent0d9afee3d159f5b7cdac7637808f3e25ff16a536 (diff)
downloadllvm-48f5d77eeed4d7453d199c4b4ac16c1bbfbdbddf.zip
llvm-48f5d77eeed4d7453d199c4b4ac16c1bbfbdbddf.tar.gz
llvm-48f5d77eeed4d7453d199c4b4ac16c1bbfbdbddf.tar.bz2
[NFC] Use TypeSize::getKnownMinValue() instead of TypeSize::getKnownMinSize()
This change is one of a series to implement the discussion from https://reviews.llvm.org/D141134.
Diffstat (limited to 'llvm/lib/IR/Value.cpp')
-rw-r--r--llvm/lib/IR/Value.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp
index 6dc7af9..568b145 100644
--- a/llvm/lib/IR/Value.cpp
+++ b/llvm/lib/IR/Value.cpp
@@ -855,7 +855,7 @@ uint64_t Value::getPointerDereferenceableBytes(const DataLayout &DL,
if (Type *ArgMemTy = A->getPointeeInMemoryValueType()) {
if (ArgMemTy->isSized()) {
// FIXME: Why isn't this the type alloc size?
- DerefBytes = DL.getTypeStoreSize(ArgMemTy).getKnownMinSize();
+ DerefBytes = DL.getTypeStoreSize(ArgMemTy).getKnownMinValue();
}
}
}
@@ -899,7 +899,7 @@ uint64_t Value::getPointerDereferenceableBytes(const DataLayout &DL,
} else if (auto *AI = dyn_cast<AllocaInst>(this)) {
if (!AI->isArrayAllocation()) {
DerefBytes =
- DL.getTypeStoreSize(AI->getAllocatedType()).getKnownMinSize();
+ DL.getTypeStoreSize(AI->getAllocatedType()).getKnownMinValue();
CanBeNull = false;
CanBeFreed = false;
}