Add llvm_supports_darwin_and_target to DejaGNU as well, I'd almost forgotten it
[oota-llvm.git] / test / lib / llvm.exp
index 2c1bef939afe81d44cee1fa638c2c546c4b5097b..319cc11c710b8ff6968236edd599bd1cac15afe4 100644 (file)
@@ -301,6 +301,16 @@ proc llvm_supports_target { tgtName } {
   return 0
 }
 
+proc llvm_supports_darwin_and_target { tgtName } {
+  global target_triplet
+  if { [ llvm_supports_target $tgtName ] } {
+    if { [regexp darwin $target_triplet match] } {
+      return 1
+    }
+  }
+  return 0
+}
+
 # This procedure provides an interface to check the BINDINGS_TO_BUILD makefile
 # variable to see if a particular binding has been configured to build.
 proc llvm_supports_binding { name } {