Fix argument expansion of reference fields of structs
r268261 made Clang "expand" more struct arguments on Windows. It removed the check for 'RD->isCLike()', which was preventing us from attempting to expand structs with reference type fields. Our expansion code was attempting to load and pass each field of the type in turn. We were accidentally doing one to many loads on reference type fields. On the function prologue side, we can use EmitLValueForFieldInitialization, which obviously gets the address of the field. On the call side, I tweaked EmitRValueForField directly, since this is the only use of this method. Fixes PR27607 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268321 91177308-0d34-0410-b5e6-96231b3b80d8
Loading
Please register or sign in to comment