[llvm] r251815 - MachO: improve load command tests slightly

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 2 10:33:35 PST 2015


Author: tnorthover
Date: Mon Nov  2 12:33:35 2015
New Revision: 251815

URL: http://llvm.org/viewvc/llvm-project?rev=251815&view=rev
Log:
MachO: improve load command tests slightly

Added:
    llvm/trunk/test/MC/MachO/ARM/watchos-version-min-load-command.s
Modified:
    llvm/trunk/test/MC/MachO/darwin-version-min-load-command.s

Added: llvm/trunk/test/MC/MachO/ARM/watchos-version-min-load-command.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/ARM/watchos-version-min-load-command.s?rev=251815&view=auto
==============================================================================
--- llvm/trunk/test/MC/MachO/ARM/watchos-version-min-load-command.s (added)
+++ llvm/trunk/test/MC/MachO/ARM/watchos-version-min-load-command.s Mon Nov  2 12:33:35 2015
@@ -0,0 +1,13 @@
+// RUN: llvm-mc -triple armv7k-apple-watchos %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.
+.watchos_version_min 99,8,7
+
+// CHECK: MinVersion {
+// CHECK-NEXT:   Cmd: LC_VERSION_MIN_WATCHOS
+// CHECK-NEXT:   Size: 16
+// CHECK-NEXT:   Version: 99.8.7
+// CHECK-NEXT:   SDK: n/a
+// CHECK-NEXT: }

Modified: llvm/trunk/test/MC/MachO/darwin-version-min-load-command.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/darwin-version-min-load-command.s?rev=251815&r1=251814&r2=251815&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/darwin-version-min-load-command.s (original)
+++ llvm/trunk/test/MC/MachO/darwin-version-min-load-command.s Mon Nov  2 12:33:35 2015
@@ -16,9 +16,14 @@
 // CHECK-DARWIN-NOT: LC_VERSION_MIN
 
 
-// FIXME: llvm-objdump doesn't know about WATCHOS LC yet
+// FIXME: llvm-objdump doesn't know about WATCHOS and TVOS VERSION_MIN LC yet
 // FIXME: llvm-mc -triple x86_64-apple-watchos1.0.0 %s -filetype=obj -o - | llvm-objdump -macho -private-headers - | FileCheck %s --check-prefix=CHECK-WATCHOS
+// FIXME: llvm-mc -triple x86_64-apple-tvos8.0.0 %s -filetype=obj -o - | llvm-objdump -macho -private-headers - | FileCheck %s --check-prefix=CHECK-TVOS
 // CHECK-WATCHOS: Load command
-// CHECK-WATCHOS:       cmd LC_VERSION_MIN_WATCHOS
-// CHECK-WATCHOS:   cmdsize 16
-// CHECK-WATCHOS:   version 1.0
+// CHECK-WATCHOS:           cmd LC_VERSION_MIN_WATCHOS
+// CHECK-WATCHOS-NEXT:   cmdsize 16
+// CHECK-WATCHOS-NEXT:   version 1.0
+
+// CHECK-TVOS:            cmd LC_VERSION_MIN_TVOS
+// CHECK-TVOS-NEXT:   cmdsize 16
+// CHECK-TVOS-NEXT:   version 8.0




More information about the llvm-commits mailing list