aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2009-09-13 20:14:57 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2009-09-13 20:14:57 +0000
commit0288aeed1baf069135de8bc028e1c82efae7316e (patch)
tree80d6f75e82ba31167043446768e13411ede2b483 /test
parent9222169c3ad7e619d1a8ab155b7a1118182c3c34 (diff)
downloadexternal_llvm-0288aeed1baf069135de8bc028e1c82efae7316e.zip
external_llvm-0288aeed1baf069135de8bc028e1c82efae7316e.tar.gz
external_llvm-0288aeed1baf069135de8bc028e1c82efae7316e.tar.bz2
Fix a small issue with recent changes to this code.
The 'false.c' file wasn't being used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81709 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/LLVMC/C++/dash-x.cpp11
-rw-r--r--test/LLVMC/test_data/false.c8
2 files changed, 7 insertions, 12 deletions
diff --git a/test/LLVMC/C++/dash-x.cpp b/test/LLVMC/C++/dash-x.cpp
index 437d8bb..b32400e 100644
--- a/test/LLVMC/C++/dash-x.cpp
+++ b/test/LLVMC/C++/dash-x.cpp
@@ -1,14 +1,9 @@
// 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: llvmc %s -x c++ %p/../test_data/false.c -x c %p/../test_data/false.cpp -x lisp -x whatnot -x none %p/../test_data/false2.cpp -o %t
// RUN: %abs_tmp | grep hello
-#include <iostream>
-
-extern "C" void test();
-extern std::string test2();
+extern int test_main();
int main() {
- std::cout << "h";
- test();
- std::cout << test2() << '\n';
+ test_main();
}
diff --git a/test/LLVMC/test_data/false.c b/test/LLVMC/test_data/false.c
index 98842fe..3e4e8a7 100644
--- a/test/LLVMC/test_data/false.c
+++ b/test/LLVMC/test_data/false.c
@@ -3,8 +3,8 @@
extern "C" void test();
extern std::string test2();
-int main() {
- std::cout << "h";
- test();
- std::cout << test2() << '\n';
+int test_main() {
+ std::cout << "h";
+ test();
+ std::cout << test2() << '\n';
}