From 72c5b26f3d6502fc64ae78923c92ef57f7e971c4 Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Fri, 4 Mar 2022 14:20:53 -0500 Subject: [PATCH] [lld-macho][nfc] Use %X in mapfile test LLD (and ld64) emits uppercase hex addresses in the mapfile. The map-file.s test passes right now because the addresses we emit happen not to include any alphabets, but that can easily change. I noticed this while dealing with https://github.com/llvm/llvm-project/issues/54184. Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D120941 --- lld/test/MachO/map-file.s | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lld/test/MachO/map-file.s b/lld/test/MachO/map-file.s index 11ad7f0..8b05857 100644 --- a/lld/test/MachO/map-file.s +++ b/lld/test/MachO/map-file.s @@ -30,16 +30,16 @@ # CHECK-NEXT: [ 2] {{.*}}{{/|\\}}map-file.s.tmp/foo.o # CHECK-NEXT: # Sections: -# CHECK-NEXT: # Address Size Segment Section -# CHECK-NEXT: 0x[[#TEXT]] 0x{{[0-9a-f]+}} __TEXT __text -# CHECK-NEXT: 0x[[#DATA]] 0x{{[0-9a-f]+}} __TEXT obj -# CHECK-NEXT: 0x[[#BSS]] 0x{{[0-9a-f]+}} __DATA __common +# CHECK-NEXT: # Address Size Segment Section +# CHECK-NEXT: 0x[[#%X,TEXT]] 0x{{[0-9a-f]+}} __TEXT __text +# CHECK-NEXT: 0x[[#%X,DATA]] 0x{{[0-9a-f]+}} __TEXT obj +# CHECK-NEXT: 0x[[#%X,BSS]] 0x{{[0-9a-f]+}} __DATA __common # CHECK-NEXT: # Symbols: -# CHECK-NEXT: # Address File Name -# CHECK-NEXT: 0x[[#MAIN]] [ 1] _main -# CHECK-NEXT: 0x[[#FOO]] [ 2] _foo -# CHECK-NEXT: 0x[[#NUMBER]] [ 1] _number +# CHECK-NEXT: # Address File Name +# CHECK-NEXT: 0x[[#%X,MAIN]] [ 1] _main +# CHECK-NEXT: 0x[[#%X,FOO]] [ 2] _foo +# CHECK-NEXT: 0x[[#%X,NUMBER]] [ 1] _number # RUN: %lld -map %t/c-string-literal-map %t/c-string-literal.o -o %t/c-string-literal-out # RUN: FileCheck --check-prefix=CSTRING %s < %t/c-string-literal-map -- 2.7.4