From a82bdabbf2d065b6095a3ba704a851655e23ba1b Mon Sep 17 00:00:00 2001
From: Davide Italiano <davide@freebsd.org>
Date: Fri, 28 Aug 2015 12:40:05 +0000
Subject: [PATCH] [MC] Convert tests to use llvm-readobj --macho-version-min.

As an added bonus this also tests the newly introduced feature.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246296 91177308-0d34-0410-b5e6-96231b3b80d8
---
 .../MachO/ARM/ios-version-min-load-command.s   | 18 ++++++++++++------
 test/MC/MachO/osx-version-min-load-command.s   | 18 ++++++++++++------
 2 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/test/MC/MachO/ARM/ios-version-min-load-command.s b/test/MC/MachO/ARM/ios-version-min-load-command.s
index 9f63c9bd27c..0fa29da0b4c 100644
--- a/test/MC/MachO/ARM/ios-version-min-load-command.s
+++ b/test/MC/MachO/ARM/ios-version-min-load-command.s
@@ -1,10 +1,16 @@
-// RUN: llvm-mc -triple armv7-apple-ios %s -filetype=obj -o - | macho-dump | FileCheck %s
+// RUN: llvm-mc -triple armv7-apple-ios %s -filetype=obj -o - | llvm-readobj --macho-version-min | FileCheck %s
 
 // Test the formation of the version-min load command in the MachO.
 // use a nonsense but well formed version.
 .ios_version_min 99,8,7
-// CHECK:  (('command', 37)
-// CHECK:   ('size', 16)
-// CHECK:   ('version, 6490119)
-// CHECK:   ('sdk, 0)
-// CHECK:  ),
+
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O arm
+// CHECK: Arch: arm
+// CHECK: AddressSize: 32bit
+// CHECK: MinVersion {
+// CHECK:   Cmd: LC_VERSION_MIN_IPHONEOS
+// CHECK:   Size: 16
+// CHECK:   Version: 99.8.7
+// CHECK:   SDK: n/a
+// CHECK: }
diff --git a/test/MC/MachO/osx-version-min-load-command.s b/test/MC/MachO/osx-version-min-load-command.s
index cb62565cef9..2218d556bce 100644
--- a/test/MC/MachO/osx-version-min-load-command.s
+++ b/test/MC/MachO/osx-version-min-load-command.s
@@ -1,10 +1,16 @@
-// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | macho-dump | FileCheck %s
+// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj --macho-version-min | FileCheck %s
 
 // Test the formation of the version-min load command in the MachO.
 // use a nonsense but well formed version.
 .macosx_version_min 25,3,1
-// CHECK:  (('command', 36)
-// CHECK:   ('size', 16)
-// CHECK:   ('version, 1639169)
-// CHECK:   ('sdk, 0)
-// CHECK:  ),
+
+// CHECK: File: <stdin>
+// CHECK: Format: Mach-O 64-bit x86-64
+// CHECK: Arch: x86_64
+// CHECK: AddressSize: 64bit
+// CHECK: MinVersion {
+// CHECK:   Cmd: LC_VERSION_MIN_MACOSX
+// CHECK:   Size: 16
+// CHECK:   Version: 25.3.1
+// CHECK:   SDK: n/a
+// CHECK: }
-- 
2.34.1