[llvm] [DebugInfo] Don't emit .loc directive with all values zero (PR #109978)

Paul T Robinson via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 06:34:19 PDT 2024


================
@@ -0,0 +1,26 @@
+; RUN: llc -mtriple=arm-none-eabi < %s | FileCheck %s
+; RUN: llc -mtriple=arm-none-eabi < %s | llvm-mc --triple=arm-none-eabi -mcpu=cortex-m3
+
+; CHECK-NOT: .loc    0 0 0
+; CHECK: .loc    1 2 3 prologue_end
----------------
pogo59 wrote:

```suggestion
; CHECK-NOT: .loc    0
; CHECK: .loc    1 2 3 prologue_end
; CHECK-NOT: .loc 0
```
This is slightly more robust, and means you don't need the second RUN line.

https://github.com/llvm/llvm-project/pull/109978


More information about the llvm-commits mailing list