aboutsummaryrefslogtreecommitdiff
path: root/test/LLVMC/llvmc.exp
blob: fd5a0466ad8bac2e1c16e17c79b93ba77a6f5db4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
load_lib llvm.exp

# 'false.c' is really C++, so it must be treated differently.
set special_file "$srcdir/$subdir/false.c"

if [ llvm_gcc_supports c ] then {
    # tcl seems to lack 'filter' which would've made this easier...
    set temp [glob -nocomplain $srcdir/$subdir/*.{c}]
    set c_files [list]
    foreach f $temp { if {$f != $special_file} {lappend c_files $f}}

    RunLLVMTests [lsort $c_files]
}

if [ llvm_gcc_supports c++ ] then {
    RunLLVMTests [lsort [concat [glob -nocomplain $srcdir/$subdir/*.{cpp}] $special_file]]
}

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}]]