[llvm-commits] [llvm] r132735 - in /llvm/trunk: lib/CodeGen/TargetLoweringObjectFileImpl.cpp test/CodeGen/X86/eh_frame.ll

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Fri Jun 17 20:39:04 PDT 2011


On 2011-06-17 18:22, Rafael Ávila de Espíndola wrote:
> I have reduced it to
> 
> @__FRAME_END__ = internal unnamed_addr constant [1 x i32]
> zeroinitializer, section ".eh_frame", align 4
> 
> 
> It works if you remove the unnamed_addr. I will debug it over the weekend.

So, turns out this is a bug in llvm-gcc. Given the test

static const int foo[]  __attribute__ ((used, section("foobar"))) = { 0 };

clang produces

@foo = internal constant [1 x i32] zeroinitializer, section "foobar",
align 4

llvm-gcc produces

@foo = internal unnamed_addr constant [1 x i32] zeroinitializer, section
"foobar"

The presence of unnamed_addr allows llvm to merge the constant or, as is
happening in this case, mark the section as mergeable.

llvm-gcc is really old and reaching the end of its support. Is there any
reason why you cannot use clang or dragonegg?

Cheers,
Rafael



More information about the llvm-commits mailing list