Fznamznon wrote:

> I was hoping that you might push this down into the target code — if you make 
> emitVoidPtrVAArg return an RValue, that'll handle about half of the targets. 
> Most of the rest will just need an EmitLoadOfLValue at the end

Ok, that seems doable, but I'm having trouble with `EmitLoadOfLValue`. In case 
target type is an aggregate, `EmitLoadOfLValue` still loads it as a scalar, so 
later `EmitFinalDestCopy` fails with an assertion because returned RValue is 
not aggregate.
I could just return RValue::getAggregate when target type is aggregate but I 
will have to check each time (about 16 places where I inserted 
`EmitLoadOfLValue`, I suppose) which makes it fairly big amount of code. Am I 
doing something wrong?

https://github.com/llvm/llvm-project/pull/94635
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to