[llvm] r245791 - [llvm-readobj] Test --macho-data-in-code option.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 22 13:30:56 PDT 2015


Author: davide
Date: Sat Aug 22 15:30:56 2015
New Revision: 245791

URL: http://llvm.org/viewvc/llvm-project?rev=245791&view=rev
Log:
[llvm-readobj] Test --macho-data-in-code option.

As added bonus this converts an existing test from macho-dump to 
llvm-readobj. Only 66 to go.

Modified:
    llvm/trunk/test/MC/MachO/ARM/data-in-code.s

Modified: llvm/trunk/test/MC/MachO/ARM/data-in-code.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/ARM/data-in-code.s?rev=245791&r1=245790&r2=245791&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/ARM/data-in-code.s (original)
+++ llvm/trunk/test/MC/MachO/ARM/data-in-code.s Sat Aug 22 15:30:56 2015
@@ -1,23 +1,6 @@
-@ RUN: llvm-mc -triple armv7-apple-darwin10 -filetype=obj -o - < %s | macho-dump | FileCheck %s
+@ RUN: llvm-mc -triple armv7-apple-darwin10 -filetype=obj -o - < %s | llvm-readobj --macho-data-in-code | FileCheck %s
         .text
 _foo:
-@ CHECK: # DICE 0
-@ CHECK: ('offset', 0)
-@ CHECK: ('length', 4)
-@ CHECK: ('kind', 1)
-@ CHECK: # DICE 1
-@ CHECK: ('offset', 4)
-@ CHECK: ('length', 4)
-@ CHECK: ('kind', 4)
-@ CHECK: # DICE 2
-@ CHECK: ('offset', 8)
-@ CHECK: ('length', 2)
-@ CHECK: ('kind', 3)
-@ CHECK: # DICE 3
-@ CHECK: ('offset', 10)
-@ CHECK: ('length', 1)
-@ CHECK: ('kind', 2)
-
 .data_region
         .long 10
 .end_data_region
@@ -31,3 +14,37 @@ _foo:
         .byte 3
 .end_data_region
 
+@ CHECK: File: <stdin>
+@ CHECK: Format: Mach-O arm
+@ CHECK: Arch: arm
+@ CHECK: AddressSize: 32bit
+@ CHECK: DataInCode {
+@ CHECK:   Data offset: 300
+@ CHECK:   Data size: 32
+@ CHECK:   Data entries [
+@ CHECK:     Entry {
+@ CHECK:       Index: 0
+@ CHECK:       Offset: 0
+@ CHECK:       Length: 4
+@ CHECK:       Kind: 1
+@ CHECK:     }
+@ CHECK:     Entry {
+@ CHECK:       Index: 1
+@ CHECK:       Offset: 4
+@ CHECK:       Length: 4
+@ CHECK:       Kind: 4
+@ CHECK:     }
+@ CHECK:     Entry {
+@ CHECK:       Index: 2
+@ CHECK:       Offset: 8
+@ CHECK:       Length: 2
+@ CHECK:       Kind: 3
+@ CHECK:     }
+@ CHECK:     Entry {
+@ CHECK:       Index: 3
+@ CHECK:       Offset: 10
+@ CHECK:       Length: 1
+@ CHECK:       Kind: 2
+@ CHECK:     }
+@ CHECK:   ]
+@ CHECK: }




More information about the llvm-commits mailing list