This is a minor patch to set the default DwarfInlinedStrings as inlined strings for DBX, due to DBX does not support .dwstr section for now.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/test/DebugInfo/XCOFF/dbx-inlinedstrings.ll | ||
---|---|---|
32–33 ↗ | (On Diff #335544) | I'd probably put these CHECK lines up the top near the RUN line - and flesh them out a bit, maybe? Oh, and in the RUN line, run llc to an object, run the object through llvm-dwarfdump rather than checking the assembly directly. Possibly use implicit-check-not DW_FORM_strp, and explicitly check where the DW_FORM_string turns up (perhaps dump debug_info in verbose mode, and check, for instance that the DW_AT_producer is in the right form and has the right value) (do you have a pointer to the testing that was originally added for this feature when it was introduced for NVPTX? Might be worth comparing it/seeing if there's some inspiration there) |
llvm/lib/CodeGen/CommandFlags.cpp | ||
---|---|---|
417 ↗ | (On Diff #335544) | The change here is for controlling the inlined string for llc. It is not necessary. Normally, when you compile source files by using clang, clang FE will set the debugger type for you. You should already test this, right? Wth this change, now you can test the inlined string settings only with llc. |
Addressed comments.
llvm/lib/CodeGen/CommandFlags.cpp | ||
---|---|---|
417 ↗ | (On Diff #335544) | I've verified both of clang -gdbx under Linux and clang -g under AIX, and clang FE works well for them. |
llvm/test/DebugInfo/XCOFF/dbx-inlinedstrings.ll | ||
32–33 ↗ | (On Diff #335544) | The feature for NVPTX introduced in D41827 is not the main purpose in that patch, so the whole assembly was checked directly there. |
llvm/test/DebugInfo/XCOFF/dbx-inlinedstrings.ll | ||
---|---|---|
32–33 ↗ | (On Diff #335544) | fair enough - thanks for the test update, it's probably a bit overkill here. Testing just the DW_AT_producer, for instance, seems like it'd be good enough to demonstrate the use of FORM_string and the value. No need to test a bunch of other (especially non-string) attributes (that sort of testing can make the test brittle - if we add new attributes, reorder attributes, etc, this test would need to be updated despite the functionality it intends to test not having changed) |