aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-11-08 03:25:47 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-11-08 03:25:47 +0000
commit56d03c6cb9d733de83d3d88f81f94d1b87f055f2 (patch)
tree64eb6f2add1466705dbf00e1ec4b39f2b6d4571f /test
parent48bfd0e98278bd0e06155292e474661a5845f583 (diff)
downloadexternal_llvm-56d03c6cb9d733de83d3d88f81f94d1b87f055f2.zip
external_llvm-56d03c6cb9d733de83d3d88f81f94d1b87f055f2.tar.gz
external_llvm-56d03c6cb9d733de83d3d88f81f94d1b87f055f2.tar.bz2
Add LLVMC2 tool definitions for Objective-C and Objective-C++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58885 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-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';
+}