[llvm-commits] [llvm] r102400 - in /llvm/trunk: include/llvm/Target/TargetInstrInfo.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/Target/X86/X86InstrInfo.cpp lib/Target/X86/X86InstrInfo.h test/CodeGen/PowerPC/2008-01-25-EmptyFunction.ll test/CodeGen/X86/2008-01-25-EmptyFunction.ll

Dale Johannesen dalej at apple.com
Mon Apr 26 17:36:05 PDT 2010


On Apr 26, 2010, at 4:37 PM, Chris Lattner wrote:

> Author: lattner
> Date: Mon Apr 26 18:37:21 2010
> New Revision: 102400
>
> URL: http://llvm.org/viewvc/llvm-project?rev=102400&view=rev
> Log:
> on darwin empty functions need to codegen into something of non-zero  
> length,
> otherwise labels get incorrectly merged.  We handled this by  
> emitting a
> ".byte 0", but this isn't correct on thumb/arm targets where the  
> text segment
> needs to be a multiple of 2/4 bytes.  Handle this by emitting a  
> noop.  This
> is more gross than it should be because arm/ppc are not fully  
> mc'ized yet.

Interestingly enough, we have a similar regression with zero-length  
arrays.  I don't suppose you fixed that too, did you?  Looks more like  
a FE (llvm-gcc) bug.

int x[0];
struct {} y;
struct { struct {}a[0]; } s12;

Works in C, not in C++.  (Analyzed by Nick in 7886017.)




More information about the llvm-commits mailing list