From dd56e1c92b0e6e6be249f2d2dd40894e0417223f Mon Sep 17 00:00:00 2001 From: Guillaume Chatelet Date: Fri, 6 Jan 2023 14:47:21 +0000 Subject: [NFC] Only expose getXXXSize functions in TypeSize Currently 'TypeSize' exposes two functions that serve the same purpose: - getFixedSize / getFixedValue - getKnownMinSize / getKnownMinValue source : https://github.com/llvm/llvm-project/blob/bf82070ea465969e9ae86a31dfcbf94c2a7b4c4c/llvm/include/llvm/Support/TypeSize.h#L337-L338 This patch offers to remove one of the two and stick to a single function in the code base. Differential Revision: https://reviews.llvm.org/D141134 --- llvm/lib/CodeGen/StackProtector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/StackProtector.cpp') diff --git a/llvm/lib/CodeGen/StackProtector.cpp b/llvm/lib/CodeGen/StackProtector.cpp index f76877facc19..0b16f4f41db6 100644 --- a/llvm/lib/CodeGen/StackProtector.cpp +++ b/llvm/lib/CodeGen/StackProtector.cpp @@ -218,7 +218,7 @@ bool StackProtector::HasAddressTaken(const Instruction *AI, // We can't subtract a fixed size from a scalable one, so in that case // assume the scalable value is of minimum size. TypeSize NewAllocSize = - TypeSize::Fixed(AllocSize.getKnownMinValue()) - OffsetSize; + TypeSize::Fixed(AllocSize.getKnownMinSize()) - OffsetSize; if (HasAddressTaken(I, NewAllocSize)) return true; break; -- cgit v1.2.3