Commit 354944d
authored
[DebugInfo] Fully implement DWARF issue 180201.1 (llvm#149226)
Finish making LLVM's implementation of `DW_LNCT_LLVM_source` conform to
the final accepted version of `DW_LNCT_source` from
https://dwarfstd.org/issues/180201.1.html
This is effectively a continuation of a few commits which have moved in
this direction already, including:
* c9cb4fc [DebugInfo] Store optional DIFile::Source as pointer
* 87e22bd Allow for mixing source/no-source DIFiles in one CU
This patch:
* Teaches LLParser that there is a distinction between an empty and an
absent "source:" field on DIFile.
* Makes printing the "source:" field in AsmWriter conditional on it
being present, instead of being conditional on it being non-empty.
* Teaches MC to map an empty-but-present source field to "\n" (which is
ambiguous, making the source strings "" and "\n" indistinguishable, but
that's what the DWARF issue specifies).
Add a test for round-tripping an empty source field through
assembler/bitcode.
Extend the test for the actual DWARF generation so it covers all of the
cases (absent, present-but-empty,
present-and-ambiguously-single-newline, present).1 parent 97a66a8 commit 354944d
File tree
5 files changed
+89
-26
lines changed- llvm
- lib
- AsmParser
- IR
- MC
- test
- Assembler
- DebugInfo/Generic
5 files changed
+89
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4786 | 4786 | | |
4787 | 4787 | | |
4788 | 4788 | | |
4789 | | - | |
4790 | | - | |
4791 | | - | |
| 4789 | + | |
| 4790 | + | |
| 4791 | + | |
| 4792 | + | |
| 4793 | + | |
| 4794 | + | |
| 4795 | + | |
4792 | 4796 | | |
4793 | 4797 | | |
4794 | 4798 | | |
| |||
5260 | 5264 | | |
5261 | 5265 | | |
5262 | 5266 | | |
5263 | | - | |
5264 | | - | |
| 5267 | + | |
| 5268 | + | |
| 5269 | + | |
| 5270 | + | |
| 5271 | + | |
| 5272 | + | |
| 5273 | + | |
| 5274 | + | |
| 5275 | + | |
| 5276 | + | |
| 5277 | + | |
5265 | 5278 | | |
5266 | | - | |
| 5279 | + | |
5267 | 5280 | | |
5268 | 5281 | | |
5269 | 5282 | | |
| |||
5781 | 5794 | | |
5782 | 5795 | | |
5783 | 5796 | | |
5784 | | - | |
| 5797 | + | |
5785 | 5798 | | |
5786 | 5799 | | |
5787 | 5800 | | |
| |||
6065 | 6078 | | |
6066 | 6079 | | |
6067 | 6080 | | |
6068 | | - | |
| 6081 | + | |
6069 | 6082 | | |
6070 | 6083 | | |
6071 | 6084 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2401 | 2401 | | |
2402 | 2402 | | |
2403 | 2403 | | |
2404 | | - | |
2405 | | - | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
2406 | 2407 | | |
2407 | 2408 | | |
2408 | 2409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
450 | 457 | | |
451 | | - | |
| 458 | + | |
452 | 459 | | |
453 | | - | |
| 460 | + | |
454 | 461 | | |
455 | 462 | | |
456 | 463 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
11 | | - | |
12 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
13 | 25 | | |
14 | 26 | | |
15 | 27 | | |
16 | 28 | | |
17 | 29 | | |
18 | | - | |
| 30 | + | |
19 | 31 | | |
20 | 32 | | |
21 | 33 | | |
22 | | - | |
23 | | - | |
| 34 | + | |
| 35 | + | |
24 | 36 | | |
25 | 37 | | |
26 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
27 | 47 | | |
28 | 48 | | |
29 | 49 | | |
30 | 50 | | |
31 | 51 | | |
32 | | - | |
33 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
34 | 67 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
0 commit comments