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

Reid Spencer reid at x10sys.com
Wed Apr 11 13:58:01 PDT 2007



Changes in directory llvm/test/lib:

llvm-dg.exp updated: 1.15 -> 1.16
---
Log message:

Make new variables available: compile_c, compile_cxx, link to handle tests
that want to use LLVM's notion of compiling and linking programs. This 
includes all the -I -L and optimization switches that LLVM would using to
compile or link any of this files. 


---
Diffs of the changes:  (+16 -20)

 llvm-dg.exp |   36 ++++++++++++++++--------------------
 1 files changed, 16 insertions(+), 20 deletions(-)


Index: llvm/test/lib/llvm-dg.exp
diff -u llvm/test/lib/llvm-dg.exp:1.15 llvm/test/lib/llvm-dg.exp:1.16
--- llvm/test/lib/llvm-dg.exp:1.15	Wed Apr 11 14:56:59 2007
+++ llvm/test/lib/llvm-dg.exp	Wed Apr 11 15:57:39 2007
@@ -1,6 +1,7 @@
 proc llvm-runtest { programs } { 
-    global objdir srcdir subdir target_triplet llvmgcc llvmgxx prcontext
-    global llvmgcc_version srcroot objroot llvmlibsdir
+    global srcroot objroot srcdir objdir subdir target_triplet prcontext 
+    global llvmgcc llvmgxx global llvmgcc_version llvmgccmajvers 
+    global gccpath gxxpath compile_c compile_cxx link 
 
     set timeout 60
 
@@ -46,30 +47,25 @@
 		set runline
 		set hasRunline 1
 
-		#replace %s with filename
-		regsub -all {%s} $runline $test new_runline
-
-		#replace %t with temp filenames
-		regsub -all {%t} $new_runline [file join Output $tmpFile] new_runline
-
+                set new_runline $runline
 		#replace %prcontext with prcontext.tcl (Must replace before %p)
 		regsub -all {%prcontext} $new_runline $prcontext new_runline
-
-		#replace %p with path to source, 
-		regsub -all {%p} $new_runline [file join $srcdir $subdir] new_runline
-
 		#replace %llvmgcc with actual path to llvmgcc
 		regsub -all {%llvmgcc} $new_runline "$llvmgcc -emit-llvm" new_runline
-
 		#replace %llvmgxx with actual path to llvmg++
 		regsub -all {%llvmgxx} $new_runline "$llvmgxx -emit-llvm" new_runline
-		
-		#replace %L with path to libraries
-		regsub -all {%L} $new_runline "$llvmlibsdir" new_runline
-
-		#replace %I with path to includes
-		regsub -all {%I} $new_runline "$srcroot/include" new_runline
-
+		#replace %compile_c with C compilation command
+		regsub -all {%compile_c} $new_runline "$compile_c" new_runline
+		#replace %compile_cxx with C++ compilation command
+		regsub -all {%compile_cxx} $new_runline "$compile_cxx" new_runline
+		#replace %link with C++ link command
+		regsub -all {%link} $new_runline "$link" new_runline
+		#replace %p with path to source, 
+		regsub -all {%p} $new_runline [file join $srcdir $subdir] new_runline
+		#replace %s with filename
+		regsub -all {%s} $new_runline $test new_runline
+		#replace %t with temp filenames
+		regsub -all {%t} $new_runline [file join Output $tmpFile] new_runline
 		puts $scriptFileId $new_runline
 	    } elseif {[regexp {XFAIL:[ *](.+)} $line match targets]} {
 		set targets






More information about the llvm-commits mailing list