mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-03 09:21:02 +00:00
Test if the compiler supports Ada, and enable Ada tests if so. While I was
there, delete a temporary file the objc test forgot to delete. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36312 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6cdf4a93a7
commit
4e9471d3d9
6
test/FrontendAda/dg.exp
Normal file
6
test/FrontendAda/dg.exp
Normal file
@ -0,0 +1,6 @@
|
||||
load_lib llvm.exp
|
||||
|
||||
if [ llvm_gcc_supports_ada ] then {
|
||||
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{adb,ads}]]
|
||||
}
|
||||
|
@ -194,6 +194,23 @@ proc llvm_gcc_supports_objc { } {
|
||||
set R [ catch { exec $llvmgcc -c "/tmp/llvm_obj_check.m" -o /dev/null >& /tmp/llvm_obj_check.out } ]
|
||||
set RESULT [ file size "/tmp/llvm_obj_check.out" ]
|
||||
catch { file delete "/tmp/llvm_obj_check.m" }
|
||||
catch { file delete "/tmp/llvm_obj_check.out" }
|
||||
if { $RESULT == 0 } {
|
||||
return 1
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
proc llvm_gcc_supports_ada { } {
|
||||
global llvmgcc
|
||||
catch { set file_h [ open "/tmp/llvm_ada_check.adb" w] }
|
||||
catch { puts $file_h "procedure llvm_ada_check is begin null; end;" }
|
||||
catch { close $file_h }
|
||||
set R [ catch { exec $llvmgcc -c -gnats "/tmp/llvm_ada_check.adb" >& /tmp/llvm_ada_check.out } ]
|
||||
set RESULT [ file size "/tmp/llvm_ada_check.out" ]
|
||||
catch { file delete "/tmp/llvm_ada_check.adb" }
|
||||
catch { file delete "/tmp/llvm_ada_check.out" }
|
||||
if { $RESULT == 0 } {
|
||||
return 1
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user