summaryrefslogtreecommitdiffstats
path: root/test/Driver/O.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Driver/O.c')
-rw-r--r--test/Driver/O.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Driver/O.c b/test/Driver/O.c
new file mode 100644
index 0000000..a7dedc8
--- /dev/null
+++ b/test/Driver/O.c
@@ -0,0 +1,10 @@
+// Test that we parse and translate the -O option correctly.
+
+// RUN: %clang -O -### %s 2>&1 | FileCheck -check-prefix=CHECK-O %s
+// CHECK-O: -O2
+
+// RUN: %clang -O0 -### %s 2>&1 | FileCheck -check-prefix=CHECK-O0 %s
+// CHECK-O0: -O0
+
+// RUN: %clang -O1 -### %s 2>&1 | FileCheck -check-prefix=CHECK-O1 %s
+// CHECK-O1: -O1
OpenPOWER on IntegriCloud