--- /dev/null
+// Test that we can compile .c files as C++ and vice versa
+// RUN: llvmc -x c++ %s -x c %p/../test_data/false.cpp -x lisp -x whatnot -x none %p/../test_data/false2.cpp -o %t
+// RUN: ./%t | grep hello
+
+#include <iostream>
+
+extern "C" void test();
+extern std::string test2();
+
+int main() {
+ std::cout << "h";
+ test();
+ std::cout << test2() << '\n';
+}
--- /dev/null
+load_lib llvm.exp
+
+if [ llvm_gcc_supports c++ ] then {
+ RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]
+}
--- /dev/null
+// Test that we can compile C++ code.
+// RUN: llvmc %s -o %t
+// RUN: ./%t | grep hello
+#include <iostream>
+
+int main() {
+ std::cout << "hello" << '\n';
+}
--- /dev/null
+// Check that we can compile files of different types together.
+// RUN: llvmc %s %p/../test_data/together.c -o %t
+// RUN: ./%t | grep hello
+
+extern "C" void test();
+
+int main() {
+ test();
+}
--- /dev/null
+load_lib llvm.exp
+
+if [ llvm_gcc_supports c ] then {
+ RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]
+}
--- /dev/null
+// RUN: llvmc -c -emit-llvm -o - %s | llvm-dis | grep "@f0()" | count 1
+
+int f0(void) {
+}
--- /dev/null
+/*
+ * Check that we can compile helloworld
+ * RUN: llvmc %s -o %t
+ * RUN: ./%t | grep hello
+ */
+
+#include <stdio.h>
+
+int main() {
+ printf("hello\n");
+ return 0;
+}
--- /dev/null
+/*
+ * Check that the 'include' options work.
+ * RUN: echo "int x;\n" > %t1.inc
+ * RUN: llvmc -include %t1.inc -fsyntax-only %s
+ */
+
+int f0(void) {
+ return x;
+}
--- /dev/null
+/*
+ * Check that the -opt switch works.
+ * RUN: llvmc %s -opt -o %t
+ * RUN: ./%t | grep hello
+ */
+
+#include <stdio.h>
+
+int main() {
+ printf("hello\n");
+ return 0;
+}
--- /dev/null
+/*
+ * Check that the 'sink' options work.
+ * RUN: llvmc -v -Wall %s -o %t |& grep "Wall"
+ * RUN: ./%t | grep hello
+ */
+
+#include <stdio.h>
+
+int main() {
+ printf("hello\n");
+ return 0;
+}
--- /dev/null
+/*
+ * Check that -Wall works as intended
+ * RUN: llvmc -Wall %s -o %t
+ * RUN: ./%t | grep hello
+ */
+
+#include <stdio.h>
+
+int main() {
+ printf("hello\n");
+ return 0;
+}
--- /dev/null
+load_lib llvm.exp
+
+if [ llvm_gcc_supports obj-c++ ] then {
+ RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{mm}]]
+}
--- /dev/null
+// Test that we can compile Objective-C++ code.
+// RUN: llvmc %s -o %t
+// RUN: ./%t | grep hello
+#include <iostream>
+
+int main() {
+ std::cout << "hello" << '\n';
+}
--- /dev/null
+load_lib llvm.exp
+
+if [ llvm_gcc_supports objc ] then {
+ RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{m}]]
+}
--- /dev/null
+/*
+ * Check that we can compile helloworld
+ * RUN: llvmc %s -o %t
+ * RUN: ./%t | grep hello
+ */
+
+#include <stdio.h>
+
+int main() {
+ printf("hello\n");
+ return 0;
+}
+++ /dev/null
-// Test that we can compile .c files as C++ and vice versa
-// RUN: llvmc -x c++ %s -x c %p/test_data/false.cpp -x lisp -x whatnot -x none %p/test_data/false2.cpp -o %t
-// RUN: ./%t | grep hello
-
-#include <iostream>
-
-extern "C" void test();
-extern std::string test2();
-
-int main() {
- std::cout << "h";
- test();
- std::cout << test2() << '\n';
-}
--- /dev/null
+load_lib llvm.exp
+
+RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{td}]]
+++ /dev/null
-// RUN: llvmc -c -emit-llvm -o - %s | llvm-dis | grep "@f0()" | count 1
-
-int f0(void) {
-}
+++ /dev/null
-/*
- * Check that we can compile helloworld
- * RUN: llvmc %s -o %t
- * RUN: ./%t | grep hello
- */
-
-#include <stdio.h>
-
-int main() {
- printf("hello\n");
- return 0;
-}
+++ /dev/null
-// Test that we can compile C++ code.
-// RUN: llvmc %s -o %t
-// RUN: ./%t | grep hello
-#include <iostream>
-
-int main() {
- std::cout << "hello" << '\n';
-}
+++ /dev/null
-/*
- * Check that we can compile helloworld
- * RUN: llvmc %s -o %t
- * RUN: ./%t | grep hello
- */
-
-#include <stdio.h>
-
-int main() {
- printf("hello\n");
- return 0;
-}
+++ /dev/null
-// Test that we can compile Objective-C++ code.
-// RUN: llvmc %s -o %t
-// RUN: ./%t | grep hello
-#include <iostream>
-
-int main() {
- std::cout << "hello" << '\n';
-}
+++ /dev/null
-/*
- * Check that the 'include' options work.
- * RUN: echo "int x;\n" > %t1.inc
- * RUN: llvmc -include %t1.inc -fsyntax-only %s
- */
-
-int f0(void) {
- return x;
-}
+++ /dev/null
-load_lib llvm.exp
-
-if [ llvm_gcc_supports c ] then {
- RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{c}]]
-}
-
-if [ llvm_gcc_supports c++ ] then {
- RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{cpp}]]
-}
-
-if [ llvm_gcc_supports objc ] then {
- RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{m}]]
-}
-
-if [ llvm_gcc_supports obj-c++ ] then {
- RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{mm}]]
-}
-
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{td}]]
+++ /dev/null
-/*
- * Check that the -opt switch works.
- * RUN: llvmc %s -opt -o %t
- * RUN: ./%t | grep hello
- */
-
-#include <stdio.h>
-
-int main() {
- printf("hello\n");
- return 0;
-}
+++ /dev/null
-/*
- * Check that the 'sink' options work.
- * RUN: llvmc -v -Wall %s -o %t |& grep "Wall"
- * RUN: ./%t | grep hello
- */
-
-#include <stdio.h>
-
-int main() {
- printf("hello\n");
- return 0;
-}
+++ /dev/null
-// Check that we can compile files of different types together.
-// RUN: llvmc %s %p/test_data/together.c -o %t
-// RUN: ./%t | grep hello
-
-extern "C" void test();
-
-int main() {
- test();
-}
+++ /dev/null
-/*
- * Check that -Wall works as intended
- * RUN: llvmc -Wall %s -o %t
- * RUN: ./%t | grep hello
- */
-
-#include <stdio.h>
-
-int main() {
- printf("hello\n");
- return 0;
-}