Handle empty aggregate values.
[oota-llvm.git] / utils / GenLibDeps.pl
index 16aed89474895983f348a5b4d80cf4f3eab53165..74eedd3383bcac469dd2252a04e9de6a9d073bc9 100755 (executable)
@@ -62,7 +62,8 @@ foreach my $lib (@libs ) {
   while (<DEFS>) {
     next if (! / [ABCDGRST] /);
     s/^[^ ]* [ABCDGRST] //;    
-    chomp($_);
+    s/\015?\012//; # not sure if <DEFS> is in binmode and uses LF or CRLF.
+                   # this strips both LF and CRLF.
     $libdefs{$_} = $lib;
   }
   close DEFS;
@@ -74,7 +75,8 @@ foreach my $obj (@objs ) {
   while (<DEFS>) {
     next if (! / [ABCDGRST] /);
     s/^[^ ]* [ABCDGRST] //;
-    chomp($_);
+    s/\015?\012//; # not sure if <DEFS> is in binmode and uses LF or CRLF.
+                   # this strips both LF and CRLF.    
     $objdefs{$_} = $obj;
   }
   close DEFS;