[lld] dafe4c0 - [Mach-O][NFC] Reorder map file tests

Jez Ng via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 11 16:42:33 PST 2022


Author: Roger Kim
Date: 2022-02-11T19:42:20-05:00
New Revision: dafe4c0b5cd07fa97c1954e0cf21aa90d558578f

URL: https://github.com/llvm/llvm-project/commit/dafe4c0b5cd07fa97c1954e0cf21aa90d558578f
DIFF: https://github.com/llvm/llvm-project/commit/dafe4c0b5cd07fa97c1954e0cf21aa90d558578f.diff

LOG: [Mach-O][NFC] Reorder map file tests

We are just grouping the files and the tests together.

Reviewed By: int3, #lld-macho

Differential Revision: https://reviews.llvm.org/D119456

Added: 
    

Modified: 
    lld/test/MachO/map-file.s

Removed: 
    


################################################################################
diff  --git a/lld/test/MachO/map-file.s b/lld/test/MachO/map-file.s
index aa0bc6a8caf1..11ad7f0079cc 100644
--- a/lld/test/MachO/map-file.s
+++ b/lld/test/MachO/map-file.s
@@ -10,17 +10,6 @@
 # RUN: FileCheck %s < %t/out
 # RUN: FileCheck %s --check-prefix=MAPFILE < %t/test-map.time-trace
 
-#--- foo.s
-.section __TEXT,obj
-.globl _foo
-_foo:
-
-#--- test.s
-.comm _number, 1
-.globl _main
-_main:
-  ret
-
 # CHECK:      Sections:
 # CHECK-NEXT: Idx  Name          Size           VMA           Type
 # CHECK-NEXT: 0    __text        {{[0-9a-f]+}}  [[#%x,TEXT:]] TEXT
@@ -52,25 +41,6 @@ _main:
 # CHECK-NEXT: 0x[[#FOO]]       [  2]  _foo
 # CHECK-NEXT: 0x[[#NUMBER]]    [  1]  _number
 
-#--- c-string-literal.s
-.section __TEXT,__cstring
-.globl _hello_world, _hello_its_me, _main
-
-_hello_world:
-.asciz "Hello world!\n"
-
-_hello_its_me:
-.asciz "Hello, it's me"
-
-.text
-_main:
-  movl $0x2000004, %eax # write() syscall
-  mov $1, %rdi # stdout
-  leaq _hello_world(%rip), %rsi
-  mov $13, %rdx # length of str
-  syscall
-  ret
-
 # 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
 
@@ -91,3 +61,33 @@ _main:
 # DEADCSTRING-DAG: literal string: Hello, it's me
 
 # MAPFILE: "name":"Total Write map file"
+
+#--- foo.s
+.section __TEXT,obj
+.globl _foo
+_foo:
+
+#--- test.s
+.comm _number, 1
+.globl _main
+_main:
+  ret
+
+#--- c-string-literal.s
+.section __TEXT,__cstring
+.globl _hello_world, _hello_its_me, _main
+
+_hello_world:
+.asciz "Hello world!\n"
+
+_hello_its_me:
+.asciz "Hello, it's me"
+
+.text
+_main:
+  movl $0x2000004, %eax # write() syscall
+  mov $1, %rdi # stdout
+  leaq _hello_world(%rip), %rsi
+  mov $13, %rdx # length of str
+  syscall
+  ret


        


More information about the llvm-commits mailing list