[llvm-commits] CVS: llvm/test/DSGraphs/htmlcoldiff.pl

Chris Lattner lattner at cs.uiuc.edu
Sun Nov 10 01:32:07 PST 2002


Changes in directory llvm/test/DSGraphs:

htmlcoldiff.pl updated: 1.1 -> 1.2

---
Log message:

Add code to handle adding columns to the results


---
Diffs of the changes:

Index: llvm/test/DSGraphs/htmlcoldiff.pl
diff -u llvm/test/DSGraphs/htmlcoldiff.pl:1.1 llvm/test/DSGraphs/htmlcoldiff.pl:1.2
--- llvm/test/DSGraphs/htmlcoldiff.pl:1.1	Sat Nov  9 13:15:05 2002
+++ llvm/test/DSGraphs/htmlcoldiff.pl	Sun Nov 10 01:31:02 2002
@@ -41,16 +41,18 @@
       print $Field;
     } else {                  # If it's not a seperator, diff it...
       my $Hilight = 0;
-      my $FieldComp = $FieldsCompare[$FieldNo];
 
-      if ($Field =~ /[0-9]+\.[0-9]+/ && $FieldComp =~ /[0-9]+\.[0-9]+/ &&
-         $Field != 0) {                  # Handle floating point numbers special
-        # They are only highlighted if they change by 20% or more...
-        my $Change = $FieldComp/$Field;
-        $Hilight = 1 if ($Change > 2 || $Change < 0.5);
-
-      } elsif ($Field ne $FieldComp) {
-        $Hilight = 1;
+      if (@FieldsCompare > $FieldNo) {
+        my $FieldComp = $FieldsCompare[$FieldNo];
+        if ($Field =~ /[0-9]+\.[0-9]+/ && $FieldComp =~ /[0-9]+\.[0-9]+/ &&
+            $Field != 0) {              # Handle floating point numbers special
+          # They are only highlighted if they change by 20% or more...
+          my $Change = $FieldComp/$Field;
+          $Hilight = 1 if ($Change > 2 || $Change < 0.5);
+          
+        } elsif ($Field ne $FieldComp) {
+          $Hilight = 1;
+        }
       }
 
       print "<b>" if $Hilight;





More information about the llvm-commits mailing list