Commit f36db0f
committed
[DebugInfo] Fully implement DWARF issue 180201.1
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 c372a2c commit f36db0f
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 | |
|---|---|---|---|
| |||
4783 | 4783 | | |
4784 | 4784 | | |
4785 | 4785 | | |
4786 | | - | |
4787 | | - | |
4788 | | - | |
| 4786 | + | |
| 4787 | + | |
| 4788 | + | |
| 4789 | + | |
| 4790 | + | |
| 4791 | + | |
| 4792 | + | |
4789 | 4793 | | |
4790 | 4794 | | |
4791 | 4795 | | |
| |||
5257 | 5261 | | |
5258 | 5262 | | |
5259 | 5263 | | |
5260 | | - | |
5261 | | - | |
| 5264 | + | |
| 5265 | + | |
| 5266 | + | |
| 5267 | + | |
| 5268 | + | |
| 5269 | + | |
| 5270 | + | |
| 5271 | + | |
| 5272 | + | |
| 5273 | + | |
| 5274 | + | |
5262 | 5275 | | |
5263 | | - | |
| 5276 | + | |
5264 | 5277 | | |
5265 | 5278 | | |
5266 | 5279 | | |
| |||
5778 | 5791 | | |
5779 | 5792 | | |
5780 | 5793 | | |
5781 | | - | |
| 5794 | + | |
5782 | 5795 | | |
5783 | 5796 | | |
5784 | 5797 | | |
| |||
6062 | 6075 | | |
6063 | 6076 | | |
6064 | 6077 | | |
6065 | | - | |
| 6078 | + | |
6066 | 6079 | | |
6067 | 6080 | | |
6068 | 6081 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2398 | 2398 | | |
2399 | 2399 | | |
2400 | 2400 | | |
2401 | | - | |
2402 | | - | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
2403 | 2404 | | |
2404 | 2405 | | |
2405 | 2406 | | |
| |||
| 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