<div><span style="background-color:rgb(255, 255, 255);font-family:arial, helvetica, sans-serif">re: passing c++ objects with copy constructors/destructors, there are multiple ABIs for doing this (e.g., the gcc way, msvc way). </span><span style="background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; ">Is there a reason that the</span><span style="background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; "> DefaultABIInfo's classifyArgumentType doesn't match either of the existing ABIs? It both makes a temp copy the gcc way, AND marks pointers as "byval". All of the </span><span style="background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; ">other ABIs (x86, arm, mips) which would check and do:</span></div>


<div><span style="background-color:rgb(255, 255, 255);font-family:arial, helvetica, sans-serif"><br></span></div><div><span style="background-color:rgb(255, 255, 255);font-family:arial, helvetica, sans-serif"><div>    if (isRecordWithNonTrivialDestructorOrCopyConstructor(Ty))</div>


<div>      return ABIArgInfo::getIndirect(0, /*ByVal=*/false);</div><div><br></div><div>to only have one temp copy. So, should the default not mark "byval"?</div><div><br></div><div>LE32 / PNaCl is currently using the default, and we would like avoid the extra copy from the "byval" attribute. If the default should not be changed, is it okay to add an LE32ABIInfo (for le32 / PNaCl) which diverges from the DefaultABIInfo in this way (no "byval" attribute on the pointer for non-trivial c++ objects)? If this second approach (adding LE32ABIInfo) is acceptable, please see attached patch w/ tests for le32 changes.</div>
<div><br></div><div>If the default should be changed, I can send another patch.</div><div><br></div><div>Thanks!</div>

<div><br></div></span></div>
<div><span style="background-color:rgb(255, 255, 255);font-family:arial, helvetica, sans-serif">- Jan</span></div>