mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 14:47:00 +00:00
First small tests for llvmc2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50734 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b96cb60827
commit
3c30e6c653
3
test/LLVMC/dg.exp
Normal file
3
test/LLVMC/dg.exp
Normal file
@ -0,0 +1,3 @@
|
||||
load_lib llvm.exp
|
||||
|
||||
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{c,cpp}]]
|
12
test/LLVMC/hello.c
Normal file
12
test/LLVMC/hello.c
Normal file
@ -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;
|
||||
}
|
10
test/LLVMC/together.cpp
Normal file
10
test/LLVMC/together.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
// Check that we can compile files of different types together.
|
||||
// TOFIX: compiling files with same names should work.
|
||||
// RUN: llvmc2 %s %p/together1.c -o %t
|
||||
// RUN: ./%t | grep hello
|
||||
|
||||
extern "C" void test();
|
||||
|
||||
int main() {
|
||||
test();
|
||||
}
|
9
test/LLVMC/together1.c
Normal file
9
test/LLVMC/together1.c
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
* RUN: ignore
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void test() {
|
||||
printf("hello\n");
|
||||
}
|
Loading…
Reference in New Issue
Block a user