working on it, thanks!
On 22 October 2012 19:58, Eli Friedman <[email protected]> wrote: > On Thu, Oct 18, 2012 at 10:04 PM, Rafael Espindola > <[email protected]> wrote: >> Author: rafael >> Date: Fri Oct 19 00:04:37 2012 >> New Revision: 166266 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=166266&view=rev >> Log: >> Fix handling of the regparm attribute in the presence of classes with copy >> constructors. >> >> When I first moved regparm support to TargetInfo.cpp I tried to isolate it >> in classifyArgumentTypeWithReg, but it is actually a lot easier to flip the >> code around and check for regparm at the end of the decision tree. >> >> Without this refactoring classifyArgumentTypeWithReg would have to duplicate >> the logic about when to use non-byval indirect arguments. > > This commit is causing clang to eat memory on the following testcase, > derived from the gcc testsuite (x86-32): > > struct x { > struct { > struct {} b[0]; > } a; > }; > __attribute((regparm(2))) void f(x a) {} > > The issue is that X86_32ABIInfo::classifyArgumentType is returning > ABIArgInfo::getDirectInReg with a struct with zero members, which > confuses CodeGenModule::ConstructAttributeList. > > -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
