aboutsummaryrefslogtreecommitdiffstats
path: root/test/LLVMC
diff options
context:
space:
mode:
Diffstat (limited to 'test/LLVMC')
-rw-r--r--test/LLVMC/hello.m12
-rw-r--r--test/LLVMC/hello.mm8
2 files changed, 20 insertions, 0 deletions
diff --git a/test/LLVMC/hello.m b/test/LLVMC/hello.m
new file mode 100644
index 0000000..bf917bc
--- /dev/null
+++ b/test/LLVMC/hello.m
@@ -0,0 +1,12 @@
+/*
+ * Check that we can compile helloworld
+ * RUN: llvmc2 %s -o %t
+ * RUN: ./%t | grep hello
+ */
+
+#include <stdio.h>
+
+int main() {
+ printf("hello\n");
+ return 0;
+}
diff --git a/test/LLVMC/hello.mm b/test/LLVMC/hello.mm
new file mode 100644
index 0000000..5f14a94
--- /dev/null
+++ b/test/LLVMC/hello.mm
@@ -0,0 +1,8 @@
+// Test that we can compile Objective-C++ code.
+// RUN: llvmc2 %s -o %t
+// RUN: ./%t | grep hello
+#include <iostream>
+
+int main() {
+ std::cout << "hello" << '\n';
+}