mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 04:39:44 +00:00
Add tests for tblgen's LLVMC backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60657 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f915253dfc
commit
15dcc2a15b
6
test/LLVMC/EmptyCompilationGraph.td
Normal file
6
test/LLVMC/EmptyCompilationGraph.td
Normal file
@ -0,0 +1,6 @@
|
||||
// Check that the compilation graph can be empty.
|
||||
// RUN: tblgen -I $srcroot/include --gen-llvmc %s
|
||||
|
||||
include "llvm/CompilerDriver/Common.td"
|
||||
|
||||
def Graph : CompilationGraph<[]>;
|
20
test/LLVMC/ExternOptions.td
Normal file
20
test/LLVMC/ExternOptions.td
Normal file
@ -0,0 +1,20 @@
|
||||
// Check that extern options work.
|
||||
// The dummy tool and graph are required to silence warnings.
|
||||
// RUN: tblgen -I $srcroot/include --gen-llvmc %s | grep extern
|
||||
|
||||
include "llvm/CompilerDriver/Common.td"
|
||||
|
||||
def OptList : OptionList<[(extern_switch "Wall"),
|
||||
(extern_parameter "std"), (extern_list "L")]>;
|
||||
|
||||
def dummy_tool : Tool<[
|
||||
(cmd_line "dummy_cmd"),
|
||||
(in_language "dummy"),
|
||||
(out_language "dummy"),
|
||||
(actions (case
|
||||
(switch_on "Wall"), (stop_compilation),
|
||||
(not_empty "std"), (stop_compilation),
|
||||
(not_empty "L"), (stop_compilation)))
|
||||
]>;
|
||||
|
||||
def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
|
8
test/LLVMC/MultipleCompilationGraphs.td
Normal file
8
test/LLVMC/MultipleCompilationGraphs.td
Normal file
@ -0,0 +1,8 @@
|
||||
// Check that multiple compilation graphs are allowed.
|
||||
// RUN: tblgen -I $srcroot/include --gen-llvmc %s
|
||||
|
||||
include "llvm/CompilerDriver/Common.td"
|
||||
|
||||
def Graph1 : CompilationGraph<[]>;
|
||||
def Graph2 : CompilationGraph<[]>;
|
||||
def Graph3 : CompilationGraph<[]>;
|
12
test/LLVMC/NoActions.td
Normal file
12
test/LLVMC/NoActions.td
Normal file
@ -0,0 +1,12 @@
|
||||
// Check that tools without associated actions are accepted.
|
||||
// RUN: tblgen -I $srcroot/include --gen-llvmc %s | grep dummy_tool
|
||||
|
||||
include "llvm/CompilerDriver/Common.td"
|
||||
|
||||
def dummy_tool : Tool<[
|
||||
(cmd_line "dummy_cmd"),
|
||||
(in_language "dummy"),
|
||||
(out_language "dummy")
|
||||
]>;
|
||||
|
||||
def DummyGraph : CompilationGraph<[SimpleEdge<"root", "dummy_tool">]>;
|
4
test/LLVMC/NoCompilationGraph.td
Normal file
4
test/LLVMC/NoCompilationGraph.td
Normal file
@ -0,0 +1,4 @@
|
||||
// Check that the compilation graph is not required.
|
||||
// RUN: tblgen -I $srcroot/include --gen-llvmc %s
|
||||
|
||||
include "llvm/CompilerDriver/Common.td"
|
8
test/LLVMC/TestWarnings.td
Normal file
8
test/LLVMC/TestWarnings.td
Normal file
@ -0,0 +1,8 @@
|
||||
// Check that the compiler warns about unused options!.
|
||||
// RUN: tblgen -I $srcroot/include --gen-llvmc %s | grep extern
|
||||
// XFAIL: *
|
||||
|
||||
include "llvm/CompilerDriver/Common.td"
|
||||
|
||||
def OptList : OptionList<[(extern_switch "Wall"),
|
||||
(extern_parameter "std"), (extern_list "L")]>;
|
@ -8,3 +8,4 @@ if [ llvm_gcc_supports c++ ] then {
|
||||
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{cpp}]]
|
||||
}
|
||||
|
||||
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{td}]]
|
||||
|
Loading…
Reference in New Issue
Block a user