From da116bd82c0a78d2022c34b56e45cf6e4f91eaed Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 15 May 2024 15:37:51 +0100 Subject: [PATCH] [Clang] Use ULL for std::max constant argument to fix build failure. getKnownMinValue returns uint64_t, use ULL to make sure the second arg is also 64 bit. --- clang/lib/CodeGen/Targets/Sparc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/CodeGen/Targets/Sparc.cpp b/clang/lib/CodeGen/Targets/Sparc.cpp index b82e9a69e19671..13e9550781d170 100644 --- a/clang/lib/CodeGen/Targets/Sparc.cpp +++ b/clang/lib/CodeGen/Targets/Sparc.cpp @@ -266,7 +266,7 @@ SparcV9ABIInfo::classifyType(QualType Ty, unsigned SizeLimit) const { // All structs, even empty ones, should take up a register argument slot, // so pin the minimum struct size to one bit. CB.pad(llvm::alignTo( - std::max(CB.DL.getTypeSizeInBits(StrTy).getKnownMinValue(), 1UL), 64)); + std::max(CB.DL.getTypeSizeInBits(StrTy).getKnownMinValue(), 1ULL), 64)); // Try to use the original type for coercion. llvm::Type *CoerceTy = CB.isUsableType(StrTy) ? StrTy : CB.getType();