CoTinker wrote:

Inconsistency here is inevitable.
Such struct `SuperEmpty { struct{ int a[0];} b;}` in c++ mode can not be 
ignored in i386 for that c++ fields are never empty, and its TypeInfo.Width = 
TypeInfo.Align = 0.
https://github.com/llvm/llvm-project/blob/594989918bf9e178f3b7c5e200d700d0574f15ec/clang/lib/CodeGen/Targets/X86.cpp#L1070-L1091

And Indirect is false, so that DirectSize = DirectAlign = 0, which leads to 
error.
https://github.com/llvm/llvm-project/blob/594989918bf9e178f3b7c5e200d700d0574f15ec/clang/lib/CodeGen/ABIInfoImpl.cpp#L205-L230

How do I fix this? Change the classifyArgumentType or the EmiVAArg? 
@efriedma-quic 

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

Reply via email to