Patch adds an option for emission of inlined strings rather than
.debug_str section.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 15072 Build 15072: arc lint + arc unit
Event Timeline
lib/CodeGen/AsmPrinter/DwarfDebug.cpp | ||
---|---|---|
118 | 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 | 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 | 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 |
|
test/DebugInfo/Generic/inlined-strings.ll | ||
---|---|---|
38 |
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 | 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 | But these new checks are still good? |
test/DebugInfo/Generic/inlined-strings.ll | ||
---|---|---|
38 | 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 | ||
---|---|---|
5 | 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 | wether - > whether |
What's the motivation for this change? Do you have a platform that doesn't support debug_string?
wether - > whether