diff options
author | Duncan Sands <baldrick@free.fr> | 2007-04-21 20:20:47 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2007-04-21 20:20:47 +0000 |
commit | 4e9471d3d9c6a478a1e6203e46a2b273b7e732b9 (patch) | |
tree | dc29349687e3228dd1acb4cf4f2e50cb227ab6f6 /test/lib | |
parent | 6cdf4a93a7683d824f0c1677b804b3eea0ffcf6f (diff) |
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
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/llvm.exp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/lib/llvm.exp b/test/lib/llvm.exp index 97eb05822e..e4a52a0c1c 100644 --- a/test/lib/llvm.exp +++ b/test/lib/llvm.exp @@ -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 { |