[llvm-commits] CVS: llvm/test/lib/llvm.exp

Duncan Sands baldrick at free.fr
Sat Apr 21 13:21:09 PDT 2007



Changes in directory llvm/test/lib:

llvm.exp updated: 1.18 -> 1.19
---
Log message:

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.


---
Diffs of the changes:  (+17 -0)

 llvm.exp |   17 +++++++++++++++++
 1 files changed, 17 insertions(+)


Index: llvm/test/lib/llvm.exp
diff -u llvm/test/lib/llvm.exp:1.18 llvm/test/lib/llvm.exp:1.19
--- llvm/test/lib/llvm.exp:1.18	Sat Apr 21 13:53:12 2007
+++ llvm/test/lib/llvm.exp	Sat Apr 21 15:20:47 2007
@@ -194,6 +194,23 @@
     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 {






More information about the llvm-commits mailing list