aboutsummaryrefslogtreecommitdiffstats
path: root/test/LLVMC
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2008-05-30 19:56:27 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2008-05-30 19:56:27 +0000
commit74a0c28fba95a307454146d7018f9671948b3102 (patch)
tree17b1d1e26e8fb7afa236f1b3fbf8ad68a73497cd /test/LLVMC
parent18aac1c6225da41a89eeafb1b10c061d39a81481 (diff)
downloadexternal_llvm-74a0c28fba95a307454146d7018f9671948b3102.zip
external_llvm-74a0c28fba95a307454146d7018f9671948b3102.tar.gz
external_llvm-74a0c28fba95a307454146d7018f9671948b3102.tar.bz2
Fix the -opt switch and add a test case for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/LLVMC')
-rw-r--r--test/LLVMC/opt-test.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/LLVMC/opt-test.c b/test/LLVMC/opt-test.c
new file mode 100644
index 0000000..25ca66a
--- /dev/null
+++ b/test/LLVMC/opt-test.c
@@ -0,0 +1,12 @@
+/*
+ * Check that the -opt switch works.
+ * RUN: llvmc2 %s -opt -o %t
+ * RUN: ./%t | grep hello
+ */
+
+#include <stdio.h>
+
+int main() {
+ printf("hello\n");
+ return 0;
+}