summaryrefslogtreecommitdiff
path: root/test/MC/MachO
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2013-01-18 01:25:48 +0000
committerDaniel Dunbar <daniel@zuster.org>2013-01-18 01:25:48 +0000
commitcddd236e8a5acb80e9a0e79dc63f6cfaa8205b86 (patch)
treea15dec96a85a567f8f4e96b8c6d30f76f4c42cfc /test/MC/MachO
parentbfdcc70d34f9c2bf3d4815c6d29fd43f01db8b76 (diff)
[MC/Mach-O] Add AsmParser support for .linker_option directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172778 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/MachO')
-rw-r--r--test/MC/MachO/linker-option-1.s21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/MC/MachO/linker-option-1.s b/test/MC/MachO/linker-option-1.s
new file mode 100644
index 00000000000..a01cab78f39
--- /dev/null
+++ b/test/MC/MachO/linker-option-1.s
@@ -0,0 +1,21 @@
+// RUN: not llvm-mc -triple x86_64-apple-darwin10 %s 2> %t.err > %t
+// RUN: FileCheck --check-prefix=CHECK-OUTPUT < %t %s
+// RUN: FileCheck --check-prefix=CHECK-ERROR < %t.err %s
+
+// CHECK-OUTPUT: .linker_option "a"
+.linker_option "a"
+// CHECK-OUTPUT: .linker_option "a", "b"
+.linker_option "a", "b"
+// CHECK-OUTPUT-NOT: .linker_option
+// CHECK-ERROR: expected string in '.linker_option' directive
+// CHECK-ERROR: .linker_option 10
+// CHECK-ERROR: ^
+.linker_option 10
+// CHECK-ERROR: expected string in '.linker_option' directive
+// CHECK-ERROR: .linker_option "a",
+// CHECK-ERROR: ^
+.linker_option "a",
+// CHECK-ERROR: unexpected token in '.linker_option' directive
+// CHECK-ERROR: .linker_option "a" "b"
+// CHECK-ERROR: ^
+.linker_option "a" "b"