Add test case for the same. This test case will also serve as a
starting point for later symbolizer tests.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Hmm - I would've thought there'd be some specific test coverage for this code already that it could be added to for DWARFv5 - but might be lost in the mists of time & this seems good.
The symbolize-directory test right next to it would be perfect (and, in fact, this code derives from that).
Except it deals with the directory entry zero, which is unallowed in dwarf4 and required in dwarf5, which makes sharing the source file between the two a bit of a pain. It's also testing something important, so needs to stay.
I wonder if this is worth unit-testing instead of/in addition to the lit test? The Prologue class should be fairly straightforward to instantiate with the necessary contents, allowing you to test the functionality more directly.
llvm/test/DebugInfo/symbolize-paths.s | ||
---|---|---|
9 | This should look like: # Absolute include-dirs should not have comp-dir prepended # CHECK: /absolute{{/|\\}}1.cc:1:0 # Relative include-dirs should have comp-dir prepended # CHECK: /comp_dir{{/|\\}}relative{{/|\\}}2.cc:2:1
The path components are concatenated by \\ on Windows. thakis has fixed the test. |
This should look like:
The path components are concatenated by \\ on Windows.
thakis has fixed the test.