http://llvm.org/bugs/show_bug.cgi?id=19001
Bug ID: 19001
Summary: Attribute 'nodebug' disables line information when
inlined
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
$ cat nodebug.cc
__attribute__((__always_inline__, __nodebug__))
static int f(int x) {
return __builtin_bswap32(x);
}
int main() {
return f(0);
}
$ ./bin/clang++ nodebug.cc -O0 -g -S -emit-llvm -o -
...
define i32 @main() #0 {
entry:
%x.addr.i = alloca i32, align 4
%retval = alloca i32, align 4
store i32 0, i32* %retval
store i32 0, i32* %x.addr.i, align 4
%0 = load i32* %x.addr.i, align 4
%1 = call i32 @llvm.bswap.i32(i32 %0) #2
ret i32 %1, !dbg !12
}
...
Instructions that are inlined from f are missing debug annotations.
I expect them to have line/column information from the call site (i.e. main()
function).
The way it is done now, binary code emitted for these instructions is assigned
line numbers from the preceding instructions, which is unstable in respect to
code moving optimizations.
--
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