Patch adds an option for emission of inlined strings rather than
.debug_str section.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/CodeGen/AsmPrinter/DwarfDebug.cpp | ||
---|---|---|
118 ↗ | (On Diff #134625) | Are you intending to add platform-specific defaulting within DwarfDebug? If not, then this is a simple on/off switch that defaults to off. |
test/DebugInfo/Generic/inlined-strings.ll | ||
38 ↗ | (On Diff #134625) | This is spelled incorrectly (I expect you want DW_FORM_strp), and only verifies that the form does not appear after the last positive matching string. I would be more inclined to run the test twice, once with Enable and once with Disable, with checks along the lines of ENABLE-NOT: DW_FORM_str{{(p|x)}} ENABLE: DW_FORM_string ENABLE-NOT: DW_FORM_str{{(p|x)}} DISABLE-NOT: DW_FORM_string DISABLE: DW_FORM_str{{p|x)}} DISABLE-NOT: DW_FORM_string That makes the test specific to the behavior of the option, and the forms it produces, omitting irrelevant concerns about tags and attributes. |
lib/CodeGen/AsmPrinter/DwarfDebug.cpp | ||
---|---|---|
118 ↗ | (On Diff #134625) | Yes, this is what Eric Christofer suggested to do as the first step. I'll enable it for NVPTX target |
test/DebugInfo/Generic/inlined-strings.ll | ||
38 ↗ | (On Diff #134625) |
|
test/DebugInfo/Generic/inlined-strings.ll | ||
---|---|---|
38 ↗ | (On Diff #134625) |
CHECK-NOT: DW_FORM_str{{(p|x)}} CHECK: DW_FORM_string CHECK-NOT: DW_FORM_str{{(p|x)}} |
test/DebugInfo/Generic/inlined-strings.ll | ||
---|---|---|
38 ↗ | (On Diff #134625) | Actually I meant the above 3 CHECK lines were all you needed, for the entire test. Sorry for not making that clear. |
test/DebugInfo/Generic/inlined-strings.ll | ||
---|---|---|
38 ↗ | (On Diff #134625) | But these new checks are still good? |
test/DebugInfo/Generic/inlined-strings.ll | ||
---|---|---|
38 ↗ | (On Diff #134625) | They are overkill. The 3 lines from my previous comment are all you need. |
Instead of all the elaborate checks, you could use llvm-dwarfdump -debug-str (dump just the .debug_str section) and then use CHECK-NOT: " to prove it's empty.
test/DebugInfo/Generic/inlined-strings.ll | ||
---|---|---|
4 ↗ | (On Diff #134667) | You can avoid generating the temp file here. Instead of > %t you do -o - and then pipe it to llvm-dwarfdump with an input file of -. |
Actually never mind. Losing all the debug info would also pass that check, so my previous 3-line recommendation stands.
One inline typo, otherwise fix up what Paul asked for and LGTM.
-eric
lib/CodeGen/AsmPrinter/DwarfDebug.h | ||
---|---|---|
497 ↗ | (On Diff #134711) | wether - > whether |
What's the motivation for this change? Do you have a platform that doesn't support debug_string?