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:
Duncan Sands 2007-04-21 20:20:47 +00:00
parent 6cdf4a93a7
commit 4e9471d3d9
2 changed files with 23 additions and 0 deletions

6
test/FrontendAda/dg.exp Normal file
View File

@ -0,0 +1,6 @@
load_lib llvm.exp
if [ llvm_gcc_supports_ada ] then {
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{adb,ads}]]
}

View File

@ -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 {