[clang] [libc] [llvm] [libc] Implement (v|f)printf on the GPU (PR #96369)
Jon Chesterfield via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 1 07:24:42 PDT 2024
================
@@ -215,7 +219,10 @@ void NVPTXABIInfo::computeInfo(CGFunctionInfo &FI) const {
RValue NVPTXABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
QualType Ty, AggValueSlot Slot) const {
- llvm_unreachable("NVPTX does not support varargs");
+ return emitVoidPtrVAArg(CGF, VAListAddr, Ty, /*IsIndirect=*/false,
+ getContext().getTypeInfoInChars(Ty),
+ CharUnits::fromQuantity(4),
----------------
JonChesterfield wrote:
Error is here - this says slots shall be at least four bytes in size, but nvcc looks happy to pass struct {char} right next to other things, so we're looking for CharUnits::fromQuantity(1),
https://github.com/llvm/llvm-project/pull/96369
More information about the cfe-commits
mailing list