Enable Objective-C tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36281 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2007-04-20 21:24:01 +00:00
parent ba647becb9
commit 9fe9907ff9
2 changed files with 20 additions and 0 deletions

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

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

View File

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