summaryrefslogtreecommitdiff
path: root/test/lib/llvm.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/llvm.exp')
-rw-r--r--test/lib/llvm.exp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/lib/llvm.exp b/test/lib/llvm.exp
index 57e26e7f42..d54f488d16 100644
--- a/test/lib/llvm.exp
+++ b/test/lib/llvm.exp
@@ -187,3 +187,17 @@ proc RunLLVMTests { test_source_files } {
}
}
}
+
+proc llvm_gcc_supports_objc { } {
+ global llvmgcc
+ catch { set file_h [ open "/tmp/llvm_obj_check.m" w] }
+ 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" }
+ if { $RESULT == 0 } {
+ return 1
+ } else {
+ return 0
+ }
+}
+