http://llvm.org/bugs/show_bug.cgi?id=12530
Bug #: 12530
Summary: llvm-link dropping debug-information for local
variables.
Product: tools
Version: 3.0
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: llvm-link
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
When using llvm-link to merge bitcode-files, the debug-information for
local-variables is lost.
Probably because calls to @llvm.dbg.declare do no longer refer to the
alloca-calls, after linking. Instead they point to a newly created, empty,
metadata-node.
In the following testcase, the call to:
@llvm.dbg.declare(metadata !{i32* %b}, metadata !12)
turns into:
@llvm.dbg.declare(metadata !21, metadata !22)
!21 = metadata !{null}
--- test.c ---
int test() {
int a;
return a;
}
--- test1.c ---
int test1() {
int b;
return b;
}
--- Makefile ---
llvm_dir=../llvm
bin_dir=../llvm_build/bin
CC=${bin_dir}/clang
CFLAGS=-O0 -nostdinc -ccc-host-triple arm-unknown-unknown -S -g -emit-llvm
-msoft-float
LLVM_LINK=${bin_dir}/llvm-link
all: test.c test1.c
${CC} ${CFLAGS} -o test.ll test.c
${CC} ${CFLAGS} -o test1.ll test1.c
${LLVM_LINK} -o test.link1.bc test.ll test1.ll
${bin_dir}/opt -S test.link1.bc
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs