Skip to content

Commit

Permalink
[Clang] Use ULL for std::max constant argument to fix build failure.
Browse files Browse the repository at this point in the history
getKnownMinValue returns uint64_t, use ULL to make sure the second arg
is also 64 bit.
  • Loading branch information
fhahn committed May 15, 2024
1 parent eda098a commit da116bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/CodeGen/Targets/Sparc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit da116bd

Please sign in to comment.