Commit 2c45677
committed
[DebugInfo] Fix line 0 records incorrectly having is_stmt set
Fixes issue #33870 (Bugzilla #34522)
Line 0 debug records should not have the is_stmt flag set in DWARF.
This change ensures is_stmt is only set for non-zero line numbers.
Changes made in DwarfDebug.cpp:
- beginInstruction: Only set is_stmt for prologue_end if line != 0
- beginInstruction: Only set is_stmt for key instructions if line != 0
- emitInitialLocDirective: Set is_stmt=0 if scopeLine == 0
Added two test cases to verify the behavior:
- llvm/test/DebugInfo/X86/line-0-no-is-stmt.ll: Verifies line 0 does not get is_stmt
- llvm/test/DebugInfo/X86/line-nonzero-has-is-stmt.ll: Verifies non-zero lines do get is_stmt1 parent 77a194c commit 2c45677
File tree
3 files changed
+74
-4
lines changed- llvm
- lib/CodeGen/AsmPrinter
- test/DebugInfo/X86
3 files changed
+74
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2199 | 2199 | | |
2200 | 2200 | | |
2201 | 2201 | | |
2202 | | - | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
2203 | 2206 | | |
2204 | 2207 | | |
2205 | 2208 | | |
2206 | 2209 | | |
2207 | | - | |
| 2210 | + | |
| 2211 | + | |
2208 | 2212 | | |
2209 | 2213 | | |
2210 | 2214 | | |
| |||
2400 | 2404 | | |
2401 | 2405 | | |
2402 | 2406 | | |
2403 | | - | |
2404 | | - | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
2405 | 2412 | | |
2406 | 2413 | | |
2407 | 2414 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
0 commit comments