[LLVMbugs] [Bug 7811] New: Linker (llvm-ld) lose debug information on global variables even without optimizations enabled
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Aug 4 10:13:41 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7811
Summary: Linker (llvm-ld) lose debug information on global
variables even without optimizations enabled
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Linker
AssignedTo: unassignedbugs at nondot.org
ReportedBy: quickslyver at free.fr
CC: llvmbugs at cs.uiuc.edu
Reproducer:
$cat bug.c
int a;
$clang -c -emit-llvm -g -O0 bug.c -o bug.bc
$llvm-ld -no-shell-script bug.bc -v -disable-inlining -disable-opt -b linked.bc
$llvm-dis bug.bc && llvm-dis linked.bc
$cat bug.ll
[...cut...]
!0 = metadata !{i32 524340, i32 0, metadata !1, metadata !"a", metadata !"a",
metadata !"a", metadata !1, i32 1, metadata !3, i1 false, i1 true, i32* @a} ; [
DW_TAG_variable ]
[...cut...]
$ cat linked.ll
[...cut...]
!0 = metadata !{i32 524340, i32 0, metadata !1, metadata !"a", metadata !"a",
metadata !"a", metadata !1, i32 1, metadata !3, i1 false, i1 true, null} ; [
DW_TAG_variable ]
[...cut...]
------------------------------------------------
"i32* @a" is replaced by "null".
Is there some "hidden" optimizations even with "-disable-inlining -disable-opt"
because if I use "llvm-link" instead of "llvm-ld" there is not this bug.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list