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

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 2 10:44:28 PST 2015


On Mon, Nov 2, 2015 at 10:33 AM, Tim Northover via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> 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
>

Hi Tim,
I know very little about TvOS and WatchOS so I may miss something, but
there's a real reason why you can't use llvm-readobj (as you did in
the test above)?

Thanks,

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list