aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-07-27 23:37:42 +0000
committerChad Rosier <mcrosier@apple.com>2011-07-27 23:37:42 +0000
commitc154ec84c02636b0231d0f6f17a27582d12c7c05 (patch)
treef8ba2449080f4b8d460440022568eaa98384907d
parent1fc1de48cdf9a2f241e0f2c7b9e9db2322f1b794 (diff)
Test for r136294.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136296 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Driver/apple-kext-Xlinker-kext.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Driver/apple-kext-Xlinker-kext.cpp b/test/Driver/apple-kext-Xlinker-kext.cpp
new file mode 100644
index 0000000000..75d0356dbd
--- /dev/null
+++ b/test/Driver/apple-kext-Xlinker-kext.cpp
@@ -0,0 +1,15 @@
+// When -fapple-kext is specified, make sure we add -kext to the linker command.
+
+// RUN: %clang -### -fapple-kext %s 2> %t1
+// RUN: FileCheck --check-prefix=CHECK1 < %t1 %s
+
+// CHECK1: "-fapple-kext"
+// CHECK1: "-kext"
+
+// RUN: %clang -### -fapple-kext -Xlinker -kext %s 2> %t2
+// RUN: FileCheck --check-prefix=CHECK2 < %t2 %s
+
+// CHECK2: "-fapple-kext"
+// CHECK2: "-kext"
+// CHECK2-NOT: "-kext"
+