From: Ted Kremenek Date: Mon, 24 Dec 2007 08:04:39 +0000 (+0000) Subject: Added special support for stripping CRLF characters that may appear in the X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ec9e7163b8257f786fb9e0339819b1432edcf687;p=oota-llvm.git 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 --- diff --git a/utils/GenLibDeps.pl b/utils/GenLibDeps.pl index 16aed894748..74eedd3383b 100755 --- a/utils/GenLibDeps.pl +++ b/utils/GenLibDeps.pl @@ -62,7 +62,8 @@ foreach my $lib (@libs ) { while () { next if (! / [ABCDGRST] /); s/^[^ ]* [ABCDGRST] //; - chomp($_); + s/\015?\012//; # not sure if 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 () { next if (! / [ABCDGRST] /); s/^[^ ]* [ABCDGRST] //; - chomp($_); + s/\015?\012//; # not sure if is in binmode and uses LF or CRLF. + # this strips both LF and CRLF. $objdefs{$_} = $obj; } close DEFS;