Instead of adding an isSS field to LiveInterval to denote stack slot. Use top bit...
[oota-llvm.git] / tools / llvm-config / find-cycles.pl
index a280887217ab1a02c1aa1c3176b531d58db703f9..8156abd3f053bb069601306f1cb2c3e5395ed578 100755 (executable)
@@ -29,7 +29,7 @@ sub find_all_cycles;
 # Read our dependency information.
 while (<>) {
     chomp;
-    my ($module, $dependency_str) = /^([^:]*): ?(.*)$/;
+    my ($module, $dependency_str) = /^\s*([^:]+):\s*(.*)\s*$/;
     die "Malformed data: $_" unless defined $dependency_str;
     my @dependencies = split(/ /, $dependency_str);
     $DEPS{$module} = \@dependencies;
@@ -40,6 +40,7 @@ find_all_cycles();
 
 # Print out the finished cycles, with their dependencies.
 my @output;
+my $cycles_found = 0;
 foreach my $cycle (@CYCLES) {
     my @modules = sort keys %{$cycle};
 
@@ -57,9 +58,9 @@ foreach my $cycle (@CYCLES) {
     # Warn about possible linker problems.
     my @archives = grep(/\.a$/, @modules);
     if (@archives > 1) {
+        $cycles_found = $cycles_found + 1;
         print STDERR "find-cycles.pl: Circular dependency between *.a files:\n";
         print STDERR "find-cycles.pl:   ", join(' ', @archives), "\n";
-        print STDERR "find-cycles.pl: Some linkers may have problems.\n";
         push @modules, @archives; # WORKAROUND: Duplicate *.a files. Ick.
     }
 
@@ -69,6 +70,7 @@ foreach my $cycle (@CYCLES) {
 }
 print sort @output;
 
+exit $cycles_found;
 
 #==========================================================================
 #  Depedency Cycle Support