Author: Florian Hahn
Date: 2024-05-15T15:37:52+01:00
New Revision: da116bd82c0a78d2022c34b56e45cf6e4f91eaed

URL: 
https://github.com/llvm/llvm-project/commit/da116bd82c0a78d2022c34b56e45cf6e4f91eaed
DIFF: 
https://github.com/llvm/llvm-project/commit/da116bd82c0a78d2022c34b56e45cf6e4f91eaed.diff

LOG: [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.

Added: 
    

Modified: 
    clang/lib/CodeGen/Targets/Sparc.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/Targets/Sparc.cpp 
b/clang/lib/CodeGen/Targets/Sparc.cpp
index b82e9a69e1967..13e9550781d17 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();


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to