[llvm-commits] [llvm] r55962 - /llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Anton Korobeynikov
anton at korobeynikov.info
Mon Sep 8 14:58:09 PDT 2008
Hi Dale,
> Don't suppress no-dead-strip for used static functions.
This contradicts with the comment of function. Please update it. Also,
it seems, that gcc (at least, apple gcc 4.0.1) does not look to
linkage in this such situation at all:
void bar();
static int __attribute__((used)) a;
static void __attribute__((used)) foo() {
bar();
}
compiles into:
.text
.align 4,0x90
.no_dead_strip _foo
_foo:
pushl %ebp
movl %esp, %ebp
leave
jmp L_bar$stub
.no_dead_strip _a
.lcomm _a,4,2
Note, that both foo and a are 'used' here
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
More information about the llvm-commits
mailing list