summaryrefslogtreecommitdiffstats
path: root/test/Driver/Xarch.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-02 17:58:47 +0000
committered <ed@FreeBSD.org>2009-06-02 17:58:47 +0000
commitf27e5a09a0d815b8a4814152954ff87dadfdefc0 (patch)
treece7d964cbb5e39695b71481698f10cb099c23d4a /test/Driver/Xarch.c
downloadFreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.zip
FreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.tar.gz
Import Clang, at r72732.
Diffstat (limited to 'test/Driver/Xarch.c')
-rw-r--r--test/Driver/Xarch.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Driver/Xarch.c b/test/Driver/Xarch.c
new file mode 100644
index 0000000..a2a3fde
--- /dev/null
+++ b/test/Driver/Xarch.c
@@ -0,0 +1,10 @@
+// RUN: clang -ccc-host-triple i386-apple-darwin9 -m32 -Xarch_i386 -O2 %s -S -### 2> %t.log &&
+// RUN: grep ' "-O2" ' %t.log | count 1 &&
+// RUN: clang -ccc-host-triple i386-apple-darwin9 -m64 -Xarch_i386 -O2 %s -S -### 2> %t.log &&
+// RUN: grep ' "-O2" ' %t.log | count 0 &&
+// RUN: grep "argument unused during compilation: '-Xarch_i386 -O2'" %t.log &&
+// RUN: not clang -ccc-host-triple i386-apple-darwin9 -m32 -Xarch_i386 -o -Xarch_i386 -S %s -S -Xarch_i386 -o 2> %t.log &&
+// RUN: grep "error: invalid Xarch argument: '-Xarch_i386 -o'" %t.log | count 2 &&
+// RUN: grep "error: invalid Xarch argument: '-Xarch_i386 -S'" %t.log &&
+// RUN: true
+
OpenPOWER on IntegriCloud