Added special support for stripping CRLF characters that may appear in the
output of nm.
llvm-svn: 45341
diff --git a/llvm/utils/GenLibDeps.pl b/llvm/utils/GenLibDeps.pl
index 16aed89..74eedd3 100755
--- a/llvm/utils/GenLibDeps.pl
+++ b/llvm/utils/GenLibDeps.pl
@@ -62,7 +62,8 @@
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 @@
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;