summaryrefslogtreecommitdiff
path: root/utils/GenLibDeps.pl
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-12-24 08:04:39 +0000
committerTed Kremenek <kremenek@apple.com>2007-12-24 08:04:39 +0000
commitec9e7163b8257f786fb9e0339819b1432edcf687 (patch)
tree1a88268fe839eca7e7dfca58854266b6e4528f6e /utils/GenLibDeps.pl
parent81361d6a28eb29988fef865afaf182f7fe1511ad (diff)
downloadllvm-ec9e7163b8257f786fb9e0339819b1432edcf687.tar.gz
llvm-ec9e7163b8257f786fb9e0339819b1432edcf687.tar.bz2
llvm-ec9e7163b8257f786fb9e0339819b1432edcf687.tar.xz
Added special support for stripping CRLF characters that may appear in the
output of nm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45341 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/GenLibDeps.pl')
-rwxr-xr-xutils/GenLibDeps.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/GenLibDeps.pl b/utils/GenLibDeps.pl
index 16aed89474..74eedd3383 100755
--- a/utils/GenLibDeps.pl
+++ b/utils/GenLibDeps.pl
@@ -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;