[PATCH] D110740: Do not emit prologue_end for line 0 locs

Shubham Sandeep Rastogi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 29 14:18:28 PDT 2021


rastogishubham added inline comments.


================
Comment at: llvm/test/CodeGen/X86/line-zero-prologue-end.ll:14
+}
+!llvm.dbg.cu = !{!10, !19}
+!llvm.module.flags = !{!22, !28, !33}
----------------
probinson wrote:
> This seems like an excessive amount of metadata for a test that cares only about line numbers.  I assume you generated this from some Swift example; could you compile it with `-gline-tables-only` instead of just `-g` to reduce the fluff?
Thanks for the feedback Paul, yes this is a swift example, I will write a small test.c file and try to get a smaller testcase. Thanks


================
Comment at: llvm/test/DebugInfo/MIR/X86/debug-loc-0.mir:7
+# CHECK: .loc 1 0 0
+# CHECK-NOT: .loc 1 0 0 prologue_end
+# CHECK: .loc 1 37 1 prologue_end
----------------
probinson wrote:
> This change looks like it causes the test to stop verifying what the comment on line 1 says: collapse line-0 directives.  The changed test would pass if we emitted
> ```
> .loc 1 0 0
> .loc 1 0 0
> .loc 1 37 1 prologue_end
> ```
> which is not what this test wants.
I see what my error is here, so I assume this test is trying to see that multiple line 0 locs should be collapsed into one. So all I need to do is something like.


```
# CHECK: Ltmp0:
# CHECK: .loc 1 0 0
# CHECK-NOT: .loc 1 0 0
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110740/new/

https://reviews.llvm.org/D110740



More information about the llvm-commits mailing list