[lld] [lld][test] filecheck typo fixes (PR #93471)

via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 8 01:05:26 PST 2025


https://github.com/klensy updated https://github.com/llvm/llvm-project/pull/93471

>From d6db5f7ede99807f45921412a14c77f39cb55a14 Mon Sep 17 00:00:00 2001
From: klensy <nightouser at gmail.com>
Date: Mon, 27 May 2024 15:52:25 +0300
Subject: [PATCH 1/6] filecheck typo fixes

---
 lld/test/COFF/duplicate.test                         | 2 +-
 lld/test/COFF/pdb-local-constants.test               | 2 +-
 lld/test/COFF/pdb_char8_t.ll                         | 2 +-
 lld/test/ELF/aarch64-cortex-a53-843419-thunk-align.s | 2 +-
 lld/test/ELF/arm-thumb-branch-rangethunk.s           | 2 +-
 lld/test/ELF/dso-undef-size.s                        | 2 +-
 lld/test/ELF/lto/ctor-dtor-alias2.ll                 | 2 +-
 lld/test/ELF/lto/sparcv9.ll                          | 2 +-
 lld/test/MachO/compact-unwind-foldings.s             | 4 ++--
 lld/test/MachO/eh-frame.s                            | 4 ++--
 lld/test/MachO/invalid/undef-debug.s                 | 2 +-
 lld/test/wasm/tag-section.ll                         | 2 +-
 12 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/lld/test/COFF/duplicate.test b/lld/test/COFF/duplicate.test
index 11e5aa06318fe0c..f6fc2aa7c946cbd 100644
--- a/lld/test/COFF/duplicate.test
+++ b/lld/test/COFF/duplicate.test
@@ -6,7 +6,7 @@ RUN: not lld-link /out:beta.dll /dll alpha.obj beta.obj alpha.lib 2>&1 | FileChe
 
 CHECK-ALPHA: error: duplicate symbol: f
 CHECK-ALPHA: defined at {{.*}}alpha.obj
-CHECK-APLHA: defined at alpha.dll
+CHECK-ALPHA: defined at alpha.dll
 
 RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o gamma.obj %S/Inputs/gamma.ll
 RUN: not lld-link /out:gamma.exe /subsystem:console /entry:mainCRTStartup gamma.obj alpha.lib 2>&1 | FileCheck %s -check-prefix CHECK-GAMMA
diff --git a/lld/test/COFF/pdb-local-constants.test b/lld/test/COFF/pdb-local-constants.test
index 3a9538252ed8025..4e8e8c0ee865b99 100644
--- a/lld/test/COFF/pdb-local-constants.test
+++ b/lld/test/COFF/pdb-local-constants.test
@@ -18,4 +18,4 @@ CHECK-NEXT:           type = 0x1002 (const int), value = 321
 
 CHECK:                          Symbols
 CHECK:           220 | S_CONSTANT [size = 12] `i`
-CHECK-NEXT            type = 0x0074 (int), value = 123
\ No newline at end of file
+CHECK-NEXT:           type = 0x0074 (int), value = 123
\ No newline at end of file
diff --git a/lld/test/COFF/pdb_char8_t.ll b/lld/test/COFF/pdb_char8_t.ll
index 0d160f0e50c7e49..313b5c314dbb894 100644
--- a/lld/test/COFF/pdb_char8_t.ll
+++ b/lld/test/COFF/pdb_char8_t.ll
@@ -1,7 +1,7 @@
 ; REQUIRES: x86
 ; RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o %t.obj %s
 ; RUN: lld-link /nodefaultlib /noentry /dll /debug /out:%t.exe /pdb:%t.pdb %t.obj
-; RUN: llvm-pdbutil dump -type-index=0x7c %t.pdb
+; RUN: llvm-pdbutil dump -type-index=0x7c %t.pdb | FileCheck %s
 
 ; CHECK: 0x007C (char8_t) | char8_t
 
diff --git a/lld/test/ELF/aarch64-cortex-a53-843419-thunk-align.s b/lld/test/ELF/aarch64-cortex-a53-843419-thunk-align.s
index 5226d6733acbb5e..92e81f594391bb6 100644
--- a/lld/test/ELF/aarch64-cortex-a53-843419-thunk-align.s
+++ b/lld/test/ELF/aarch64-cortex-a53-843419-thunk-align.s
@@ -7,7 +7,7 @@
 // RUN:                  *(.text.02) } \
 // RUN:                  .foo : { *(.foo_sec) } } " > %t.script
 // RUN: ld.lld -pie --fix-cortex-a53-843419 --script=%t.script %t.o -o %t2
-// RUN: llvm-objdump --no-show-raw-insn --triple=aarch64-linux-gnu -d %t2
+// RUN: llvm-objdump --no-show-raw-insn --triple=aarch64-linux-gnu -d %t2 | FileCheck %s
 
 
 /// %t2 is > 128 Megabytes, so delete it early.
diff --git a/lld/test/ELF/arm-thumb-branch-rangethunk.s b/lld/test/ELF/arm-thumb-branch-rangethunk.s
index d19a43c44ad6049..1daa373563e61c3 100644
--- a/lld/test/ELF/arm-thumb-branch-rangethunk.s
+++ b/lld/test/ELF/arm-thumb-branch-rangethunk.s
@@ -2,7 +2,7 @@
 // RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
 // RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %S/Inputs/far-arm-thumb-abs.s -o %tfar
 // RUN: ld.lld  %t %tfar -o %t2
-// RUN: llvm-objdump -d %t2
+// RUN: llvm-objdump -d %t2 | FileCheck %s
  .syntax unified
  .thumb
  .section .text, "ax",%progbits
diff --git a/lld/test/ELF/dso-undef-size.s b/lld/test/ELF/dso-undef-size.s
index 2e2aa0b5fa46d43..659e3ac4564e636 100644
--- a/lld/test/ELF/dso-undef-size.s
+++ b/lld/test/ELF/dso-undef-size.s
@@ -3,7 +3,7 @@
 # RUN: ld.lld -shared %t1.o -o %t1.so
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t2.o
 # RUN: ld.lld -shared %t2.o %t1.so -o %t2.so
-# RUN: llvm-readobj --symbols --dyn-syms %t2.so
+# RUN: llvm-readobj --symbols --dyn-syms %t2.so | FileCheck %s
 
 # CHECK:      Symbols [
 # CHECK-NEXT:   Symbol {
diff --git a/lld/test/ELF/lto/ctor-dtor-alias2.ll b/lld/test/ELF/lto/ctor-dtor-alias2.ll
index fda2e95e5acd776..49ded634b1646a1 100644
--- a/lld/test/ELF/lto/ctor-dtor-alias2.ll
+++ b/lld/test/ELF/lto/ctor-dtor-alias2.ll
@@ -7,7 +7,7 @@
 ; RUN: opt -module-summary a.ll -o a.bc
 ; RUN: opt -module-summary b.ll -o b.bc
 ; RUN: ld.lld -shared a.bc b.bc -o out.so
-; RUN: llvm-nm -D out.so
+; RUN: llvm-nm -D out.so | FileCheck %s
 
 ;; Although D0/D2 in b.bc is non-prevailing, keep D1/D2 as definitions, otherwise
 ;; the output may have an undefined and unsatisfied D1.
diff --git a/lld/test/ELF/lto/sparcv9.ll b/lld/test/ELF/lto/sparcv9.ll
index a4cdc6eafa4036a..9ffdd988b6964dd 100644
--- a/lld/test/ELF/lto/sparcv9.ll
+++ b/lld/test/ELF/lto/sparcv9.ll
@@ -5,7 +5,7 @@
 ; RUN: ld.lld %t.bc -o %t
 ; RUN: llvm-readobj -h %t | FileCheck %s
 
-; CHECK    Class: 64-bit
+; CHECK:   Class: 64-bit
 ; CHECK:   DataEncoding: BigEndian
 ; CHECK: Machine: EM_SPARCV9
 
diff --git a/lld/test/MachO/compact-unwind-foldings.s b/lld/test/MachO/compact-unwind-foldings.s
index 18511da772144c5..0e97e708cf1398e 100644
--- a/lld/test/MachO/compact-unwind-foldings.s
+++ b/lld/test/MachO/compact-unwind-foldings.s
@@ -23,8 +23,8 @@
 ## Check that [1] offset starts at c's address + 3 (its length).
 # CHECK-LABEL: Contents of __unwind_info section:
 # CHECK:  Top level indices: (count = 2)
-# CHECK-NEXT : [0]: function offset=[[#%#.7x,MAIN_ADDR]]
-# CHECK-NEXT : [1]: function offset=[[#%#.7x,C_ADDR + 3]]
+# CHECK-NEXT: [0]: function offset=[[#%#.7x,MAIN_ADDR]]
+# CHECK-NEXT: [1]: function offset=[[#%#.7x,C_ADDR + 3]]
 
 #--- fold-tail.s
         .text
diff --git a/lld/test/MachO/eh-frame.s b/lld/test/MachO/eh-frame.s
index 64fd364c87a591f..70c04d2cec2d4d7 100644
--- a/lld/test/MachO/eh-frame.s
+++ b/lld/test/MachO/eh-frame.s
@@ -66,8 +66,8 @@
 # CHECK:     [2]: function offset=0x[[#%.8x,H - BASE]], LSDA offset=0x[[#%.8x,EXCEPT2 - BASE]]
 # CHECK:   Second level indices:
 # CHECK:     Second level index[0]:
-# CHECK       [0]: function offset=0x[[#%.8x,F - BASE]],              encoding[{{.*}}]=0x52{{.*}}
-# CHECK       [1]: function offset=0x[[#%.8x,NO_UNWIND - BASE]],      encoding[{{.*}}]=0x00000000
+# CHECK:      [0]: function offset=0x[[#%.8x,F - BASE]],              encoding[{{.*}}]=0x52{{.*}}
+# CHECK:      [1]: function offset=0x[[#%.8x,NO_UNWIND - BASE]],      encoding[{{.*}}]=0x00000000
 # CHECK:      [2]: function offset=0x[[#%.8x,G - BASE]],              encoding[{{.*}}]=0x0[[#%x,DWARF_ENC]][[#%.6x, G_DWARF_OFF:]]
 # CHECK:      [3]: function offset=0x[[#%.8x,H - BASE]],              encoding[{{.*}}]=0x0[[#%x,DWARF_ENC]][[#%.6x, H_DWARF_OFF:]]
 # CHECK:      [4]: function offset=0x[[#%.8x,MY_PERSONALITY - BASE]], encoding[{{.*}}]=0x00000000
diff --git a/lld/test/MachO/invalid/undef-debug.s b/lld/test/MachO/invalid/undef-debug.s
index 7cf75fa898274df..0990687d197503f 100644
--- a/lld/test/MachO/invalid/undef-debug.s
+++ b/lld/test/MachO/invalid/undef-debug.s
@@ -6,7 +6,7 @@
 # CHECK-NEXT: >>> referenced by test.c:3
 # CHECK-NEXT: >>>               {{.*}}.o:(symbol _main+0x0)
 # CHECK-NEXT: >>> referenced by test.c:2
-# CHECK-NEXT  >>>               {{.*}}.o:(symbol _ptr+0x0)
+# CHECK-NEXT: >>>               {{.*}}.o:(symbol _ptr+0x0)
 
 ## This is the output of `clang -g2 -O2 -fdebug-compilation-dir=. -fno-ident` called on the following file, with the
 ## Apple DWARF tables removed:
diff --git a/lld/test/wasm/tag-section.ll b/lld/test/wasm/tag-section.ll
index 20823c72c651160..36b2975ee9912a1 100644
--- a/lld/test/wasm/tag-section.ll
+++ b/lld/test/wasm/tag-section.ll
@@ -44,7 +44,7 @@ define void @_start() {
 ; NOPIC:        - Type:            GLOBAL
 
 ; NOPIC-EXPORT-ALL:   - Type:            EXPORT
-; NOPIC-EXPORT-ALL-NEXT Exports:
+; NOPIC-EXPORT-ALL-NEXT: Exports:
 ; NOPIC-EXPORT-ALL:       - Name:            __cpp_exception
 ; NOPIC-EXPORT-ALL:         Kind:            TAG
 ; NOPIC-EXPORT-ALL:         Index:           0

>From 1ec700a2a3fb7e4a3dd77505cba3f4d351264566 Mon Sep 17 00:00:00 2001
From: klensy <nightouser at gmail.com>
Date: Mon, 3 Feb 2025 13:43:20 +0300
Subject: [PATCH 2/6] fix

---
 lld/test/COFF/duplicate.test  |  2 +-
 lld/test/ELF/dso-undef-size.s | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lld/test/COFF/duplicate.test b/lld/test/COFF/duplicate.test
index f6fc2aa7c946cbd..b5da3d6ed878731 100644
--- a/lld/test/COFF/duplicate.test
+++ b/lld/test/COFF/duplicate.test
@@ -6,7 +6,7 @@ RUN: not lld-link /out:beta.dll /dll alpha.obj beta.obj alpha.lib 2>&1 | FileChe
 
 CHECK-ALPHA: error: duplicate symbol: f
 CHECK-ALPHA: defined at {{.*}}alpha.obj
-CHECK-ALPHA: defined at alpha.dll
+CHECK-ALPHA: defined at alpha.lib(alpha.dll)
 
 RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o gamma.obj %S/Inputs/gamma.ll
 RUN: not lld-link /out:gamma.exe /subsystem:console /entry:mainCRTStartup gamma.obj alpha.lib 2>&1 | FileCheck %s -check-prefix CHECK-GAMMA
diff --git a/lld/test/ELF/dso-undef-size.s b/lld/test/ELF/dso-undef-size.s
index 659e3ac4564e636..667890db7483048 100644
--- a/lld/test/ELF/dso-undef-size.s
+++ b/lld/test/ELF/dso-undef-size.s
@@ -7,12 +7,12 @@
 
 # CHECK:      Symbols [
 # CHECK-NEXT:   Symbol {
-# CHECK-NEXT:     Name: foo
-# CHECK-NEXT:     Value:
+# CHECK-NEXT:     Name: foo (1)
+# CHECK-NEXT:     Value: 0x0
 # CHECK-NEXT:     Size: 0
-# CHECK-NEXT:     Binding:
-# CHECK-NEXT:     Type:
-# CHECK-NEXT:     Other:
+# CHECK-NEXT:     Binding: Global (0x1)
+# CHECK-NEXT:     Type: None (0x0)
+# CHECK-NEXT:     Other: 0
 # CHECK-NEXT:     Section: Undefined
 # CHECK-NEXT:   }
 # CHECK-NEXT: ]

>From a27041bd36bb0731c7a39c2b8d69f03720980136 Mon Sep 17 00:00:00 2001
From: klensy <nightouser at gmail.com>
Date: Mon, 3 Feb 2025 19:31:23 +0300
Subject: [PATCH 3/6] fix lld/test/ELF/aarch64-cortex-a53-843419-thunk-align.s

---
 .../aarch64-cortex-a53-843419-thunk-align.s   | 30 +++++++++----------
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/lld/test/ELF/aarch64-cortex-a53-843419-thunk-align.s b/lld/test/ELF/aarch64-cortex-a53-843419-thunk-align.s
index 92e81f594391bb6..5d09ca62dc66d86 100644
--- a/lld/test/ELF/aarch64-cortex-a53-843419-thunk-align.s
+++ b/lld/test/ELF/aarch64-cortex-a53-843419-thunk-align.s
@@ -36,13 +36,13 @@ t3_ff8_ldr:
  ret
 
 /// Expect thunk and patch to be inserted here
-// CHECK: 0000000000011008 __AArch64ADRPThunk_far_away:
-// CHECK-NEXT: 11008: adrp    x16, #134221824
-// CHECK-NEXT:        add     x16, x16, #16
-// CHECK-NEXT:        br      x16
-// CHECK: 0000000000012008 __CortexA53843419_11000:
-// CHECK-NEXT: 12008: ldr     x0, [x0, #168]
-// CHECK-NEXT:        b       #-4104 <t3_ff8_ldr+0xc>
+// CHECK-LABEL: 0000000000011008 <__AArch64ADRPThunk_far_away>:
+// CHECK-NEXT: 11008: adrp      x16, 0x8012000
+// CHECK-NEXT:        add     x16, x16, #0x10
+// CHECK-NEXT::       br      x16
+// CHECK-LABEL: 0000000000012008 <__CortexA53843419_11000>:
+// CHECK-NEXT: 12008: ldr     x0, [x0, #0xb8]
+// CHECK-NEXT: 1200c: b       0x11004 <t3_ff8_ldr+0xc>
 
  .section .text.02, "ax", %progbits
  .globl far_away
@@ -52,15 +52,13 @@ far_away:
  ret
 /// Expect thunk for _start not to have size rounded up to 4KiB as it is at
 /// the end of the OutputSection
-// CHECK: 0000000008012010 far_away:
-// CHECK-NEXT:  8012010: bl      #8
-// CHECK-NEXT:           ret
-// CHECK: 0000000008012018 __AArch64ADRPThunk__start:
-// CHECK-NEXT:  8012018: adrp    x16, #-134225920
-// CHECK-NEXT:           add     x16, x16, #0
-// CHECK-NEXT:           br      x16
-// CHECK: 0000000008012024 foo:
-// CHECK-NEXT:  8012024: ret
+// CHECK-LABEL: 0000000008012010 <far_away>:
+// CHECK-NEXT: 8012010: bl      0x8012018 <__AArch64ADRPThunk__start>
+// CHECK-NEXT: 8012014: ret
+// CHECK-LABEL: 0000000008012018 <__AArch64ADRPThunk__start>:
+// CHECK-NEXT: 8012018: adrp    x16, 0x10000
+// CHECK-NEXT: 801201c: add     x16, x16, #0x0
+// CHECK-NEXT: 8012020: br      x16
  .section .foo_sec, "ax", %progbits
  .globl foo
  .type foo, function

>From 084d4165993771414078bc71cf9d070eabcf47a1 Mon Sep 17 00:00:00 2001
From: klensy <nightouser at gmail.com>
Date: Mon, 3 Feb 2025 19:35:27 +0300
Subject: [PATCH 4/6] fix lld/test/ELF/arm-thumb-branch-rangethunk.s

---
 lld/test/ELF/arm-thumb-branch-rangethunk.s | 34 +++++++++-------------
 1 file changed, 14 insertions(+), 20 deletions(-)

diff --git a/lld/test/ELF/arm-thumb-branch-rangethunk.s b/lld/test/ELF/arm-thumb-branch-rangethunk.s
index 1daa373563e61c3..f19fbeed16a1854 100644
--- a/lld/test/ELF/arm-thumb-branch-rangethunk.s
+++ b/lld/test/ELF/arm-thumb-branch-rangethunk.s
@@ -1,8 +1,8 @@
 // REQUIRES: arm
 // RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
 // RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %S/Inputs/far-arm-thumb-abs.s -o %tfar
-// RUN: ld.lld  %t %tfar -o %t2
-// RUN: llvm-objdump -d %t2 | FileCheck %s
+// RUN: ld.lld -Ttext=0x20000 %t %tfar -o %t2
+// RUN: llvm-objdump --no-show-raw-insn -d %t2 | FileCheck %s
  .syntax unified
  .thumb
  .section .text, "ax",%progbits
@@ -16,22 +16,16 @@ _start:
  b   too_far2
  beq.w too_far3
 
-// CHECK: Disassembly of section .text:
+// CHECK-LABEL: 00020000 <_start>:
+// CHECK-NEXT: 20000: bl      0x2000c <__Thumbv7ABSLongThunk_too_far1>
+// CHECK-NEXT:        b.w     0x20010 <__Thumbv7ABSLongThunk_too_far2>
+// CHECK-NEXT:        beq.w   0x20014 <__Thumbv7ABSLongThunk_too_far3>
 // CHECK-EMPTY:
-// CHECK-NEXT: _start:
-// CHECK-NEXT:    20000:       00 f0 04 f8     bl      #8
-// CHECK-NEXT:    20004:       00 f0 07 b8     b.w     #14 <__Thumbv7ABSLongThunk_too_far2>
-// CHECK-NEXT:    20008:       00 f0 0a 80     beq.w   #20 <__Thumbv7ABSLongThunk_too_far3>
-// CHECK: __Thumbv7ABSLongThunk_too_far1:
-// CHECK-NEXT:    2000c:       40 f2 05 0c     movw    r12, #5
-// CHECK-NEXT:    20010:       c0 f2 02 1c     movt    r12, #258
-// CHECK-NEXT:    20014:       60 47   bx      r12
-// CHECK: __Thumbv7ABSLongThunk_too_far2:
-// CHECK-NEXT:    20016:       40 f2 09 0c     movw    r12, #9
-// CHECK-NEXT:    2001a:       c0 f2 02 1c     movt    r12, #258
-// CHECK-NEXT:    2001e:       60 47   bx      r12
-// CHECK: __Thumbv7ABSLongThunk_too_far3:
-// CHECK-NEXT:    20020:       40 f2 0d 0c     movw    r12, #13
-// CHECK-NEXT:    20024:       c0 f2 12 0c     movt    r12, #18
-// CHECK-NEXT:    20028:       60 47   bx      r12
-// CHECK-NEXT:    2002a:       00 00   movs    r0, r0
+// CHECK-NEXT: 0002000c <__Thumbv7ABSLongThunk_too_far1>:
+// CHECK-NEXT: 2000c: b.w     0x1020004
+// CHECK-EMPTY:
+// CHECK-NEXT: 00020010 <__Thumbv7ABSLongThunk_too_far2>:
+// CHECK-NEXT: 20010: b.w     0x1020008
+// CHECK-EMPTY:
+// CHECK-NEXT: 00020014 <__Thumbv7ABSLongThunk_too_far3>:
+// CHECK-NEXT: 20014: b.w     0x12000c

>From 672899566525bb80671b2bf815b30265fa44543e Mon Sep 17 00:00:00 2001
From: klensy <nightouser at gmail.com>
Date: Fri, 7 Feb 2025 17:36:16 +0300
Subject: [PATCH 5/6] bless lld/test/ELF/dso-undef-size.s

---
 lld/test/ELF/dso-undef-size.s | 74 ++++++++++++++++++++++++-----------
 1 file changed, 52 insertions(+), 22 deletions(-)

diff --git a/lld/test/ELF/dso-undef-size.s b/lld/test/ELF/dso-undef-size.s
index 667890db7483048..1312d1c6d3c05e1 100644
--- a/lld/test/ELF/dso-undef-size.s
+++ b/lld/test/ELF/dso-undef-size.s
@@ -5,28 +5,58 @@
 # RUN: ld.lld -shared %t2.o %t1.so -o %t2.so
 # RUN: llvm-readobj --symbols --dyn-syms %t2.so | FileCheck %s
 
-# CHECK:      Symbols [
-# CHECK-NEXT:   Symbol {
-# CHECK-NEXT:     Name: foo (1)
-# CHECK-NEXT:     Value: 0x0
-# CHECK-NEXT:     Size: 0
-# CHECK-NEXT:     Binding: Global (0x1)
-# CHECK-NEXT:     Type: None (0x0)
-# CHECK-NEXT:     Other: 0
-# CHECK-NEXT:     Section: Undefined
-# CHECK-NEXT:   }
-# CHECK-NEXT: ]
-# CHECK:      DynamicSymbols [
-# CHECK-NEXT:   Symbol {
-# CHECK-NEXT:     Name: foo
-# CHECK-NEXT:     Value:
-# CHECK-NEXT:     Size: 0
-# CHECK-NEXT:     Binding:
-# CHECK-NEXT:     Type:
-# CHECK-NEXT:     Other:
-# CHECK-NEXT:     Section: Undefined
-# CHECK-NEXT:   }
-# CHECK-NEXT: ]
+# CHECK: Symbols [
+# CHECK-NEXT:  Symbol {
+# CHECK-NEXT:    Name:  (0)
+# CHECK-NEXT:    Value: 0x0
+# CHECK-NEXT:    Size: 0
+# CHECK-NEXT:    Binding: Local (0x0)
+# CHECK-NEXT:    Type: None (0x0)
+# CHECK-NEXT:    Other: 0
+# CHECK-NEXT:    Section: Undefined (0x0)
+# CHECK-NEXT:  }
+# CHECK-NEXT:  Symbol {
+# CHECK-NEXT:    Name: _DYNAMIC (5)
+# skip actual value here:
+# CHECK-NEXT:    Value:
+# CHECK-NEXT:    Size: 0
+# CHECK-NEXT:    Binding: Local (0x0)
+# CHECK-NEXT:    Type: None (0x0)
+# CHECK-NEXT:    Other [ (0x2)
+# CHECK-NEXT:      STV_HIDDEN (0x2)
+# CHECK-NEXT:    ]
+# CHECK-NEXT:    Section: .dynamic (0x6)
+# CHECK-NEXT:  }
+# CHECK-NEXT:  Symbol {
+# CHECK-NEXT:    Name: foo (1)
+# CHECK-NEXT:    Value: 0x0
+# CHECK-NEXT:    Size: 0
+# CHECK-NEXT:    Binding: Global (0x1)
+# CHECK-NEXT:    Type: None (0x0)
+# CHECK-NEXT:    Other: 0
+# CHECK-NEXT:    Section: Undefined (0x0)
+# CHECK-NEXT:  }
+# CHECK-NEXT:]
+# CHECK-NEXT:DynamicSymbols [
+# CHECK-NEXT:  Symbol {
+# CHECK-NEXT:    Name:  (0)
+# CHECK-NEXT:    Value: 0x0
+# CHECK-NEXT:    Size: 0
+# CHECK-NEXT:    Binding: Local (0x0)
+# CHECK-NEXT:    Type: None (0x0)
+# CHECK-NEXT:    Other: 0
+# CHECK-NEXT:    Section: Undefined (0x0)
+# CHECK-NEXT:  }
+# CHECK-NEXT:  Symbol {
+# CHECK-NEXT:    Name: foo (1)
+# CHECK-NEXT:    Value: 0x0
+# CHECK-NEXT:    Size: 0
+# CHECK-NEXT:    Binding: Global (0x1)
+# CHECK-NEXT:    Type: None (0x0)
+# CHECK-NEXT:    Other: 0
+# CHECK-NEXT:    Section: Undefined (0x0)
+# CHECK-NEXT:  }
+# CHECK-NEXT:]
 
 .text
 .global foo

>From b33420db05ae5faf205eb45e024374ed3c872645 Mon Sep 17 00:00:00 2001
From: klensy <nightouser at gmail.com>
Date: Sat, 8 Feb 2025 12:01:57 +0300
Subject: [PATCH 6/6] fix newlines in lld/test/COFF/pdb-local-constants.test
 and comment out fix in lld/test/MachO/compact-unwind-foldings.s

---
 lld/test/COFF/pdb-local-constants.test   | 2 +-
 lld/test/MachO/compact-unwind-foldings.s | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lld/test/COFF/pdb-local-constants.test b/lld/test/COFF/pdb-local-constants.test
index 4e8e8c0ee865b99..abbf1a49c8d4a95 100644
--- a/lld/test/COFF/pdb-local-constants.test
+++ b/lld/test/COFF/pdb-local-constants.test
@@ -18,4 +18,4 @@ CHECK-NEXT:           type = 0x1002 (const int), value = 321
 
 CHECK:                          Symbols
 CHECK:           220 | S_CONSTANT [size = 12] `i`
-CHECK-NEXT:           type = 0x0074 (int), value = 123
\ No newline at end of file
+CHECK-NEXT:           type = 0x0074 (int), value = 123
diff --git a/lld/test/MachO/compact-unwind-foldings.s b/lld/test/MachO/compact-unwind-foldings.s
index 0e97e708cf1398e..c5b696c78b51101 100644
--- a/lld/test/MachO/compact-unwind-foldings.s
+++ b/lld/test/MachO/compact-unwind-foldings.s
@@ -23,8 +23,9 @@
 ## Check that [1] offset starts at c's address + 3 (its length).
 # CHECK-LABEL: Contents of __unwind_info section:
 # CHECK:  Top level indices: (count = 2)
-# CHECK-NEXT: [0]: function offset=[[#%#.7x,MAIN_ADDR]]
-# CHECK-NEXT: [1]: function offset=[[#%#.7x,C_ADDR + 3]]
+# FIXME: next two lines commented out, they broken
+# COM: CHECK-NEXT: [0]: function offset=[[#%#.7x,MAIN_ADDR]]
+# COM: CHECK-NEXT: [1]: function offset=[[#%#.7x,C_ADDR + 3]]
 
 #--- fold-tail.s
         .text



More information about the llvm-commits mailing list