[PATCH] D29765: Handle link of NoDebug CU with a CU that has debug emission enabled

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 11:13:22 PST 2017


tejohnson added a comment.

In https://reviews.llvm.org/D29765#672324, @dblaikie wrote:

> Are the locations properly respected/ignored in this case? (what does the line table end up looking like for the instructions in the nodebug inlined code?)


Here is the result of objdump -WL (let me know if there is something else you wanted to see):

$ objdump -WL a.out

a.out:     file format elf64-x86-64

Decoded dump of debug contents of section .debug_line:

CU: debug.c:
File name                            Line number    Starting address
debug.c                                        2                   0

./nodebug.c:[++]
nodebug.c                                      3                 0x4

./debug.c:[++]
debug.c                                        2                0x10

> Would it be worth/possible omitting these scopes from the LexicalScope tree in the first place, rather than filtering out here after-the-fact?

That I am not sure about, as I'm not really familiar with this code. I am hoping you will tell me. =)



================
Comment at: test/DebugInfo/Generic/debug_and_nodebug_CUs.ll:3
+; debug is handled correctly.
+
+; RUN: llc %s -o - | FileCheck %s
----------------
dblaikie wrote:
> Include comments about the source code and commands to reproduce the IR (since debug info metadata is a bit hard to read, this can help with understanding exactly what the test is testing, reproducing, etc)
Will do.


https://reviews.llvm.org/D29765





More information about the llvm-commits mailing list