diff options
author | audreyt@audreyt.org <unknown> | 2007-07-11 21:04:49 +0000 |
---|---|---|
committer | audreyt@audreyt.org <unknown> | 2007-07-11 21:04:49 +0000 |
commit | 5f9712463fedca549e89404a97f0f88e5cd78dd9 (patch) | |
tree | 9528553683150451dffa236425121443ad873d62 /driver | |
parent | c8b4b5ed1b5824c7e30fbfd2905f823c4b66d8c8 (diff) | |
download | haskell-5f9712463fedca549e89404a97f0f88e5cd78dd9.tar.gz |
In mangler, lift the multiline-match pragma to toplevel and document it better.
Diffstat (limited to 'driver')
-rw-r--r-- | driver/mangler/ghc-asm.lprl | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/driver/mangler/ghc-asm.lprl b/driver/mangler/ghc-asm.lprl index 7c8bd0a8ff..c4a2447433 100644 --- a/driver/mangler/ghc-asm.lprl +++ b/driver/mangler/ghc-asm.lprl @@ -59,6 +59,18 @@ for the same reason. Advantage: No more ridiculous call sequences. %************************************************************************ \begin{code} +############################################################################ +# Make all regexp matching multi-line aware. This replaces the line below +# originally found in "sub mangle_asm": +# +# local($*) = 1; +# +# This used to work, but Perl 5.10 removes support for $*, so we uses an +# equivalent construct that works in Perl 5.6 and later. +# +BEGIN { require overload; overload::constant( qr => sub { "(?m:$_[1])" } ) } +############################################################################ + $TargetPlatform = $TARGETPLATFORM; ($Pgm = $0) =~ s|.*/||; @@ -544,12 +556,6 @@ sub mangle_asm { local($in_asmf, $out_asmf) = @_; local($i, $c); - # multi-line regexp matching: - # local($*) = 1; - # the above line used to work, but Perl 5.10 removes $*, so we uses an - # equivalent construct that works in Perl 5.6 and later. - BEGIN { require overload; overload::constant( qr => sub { "(?m:$_[1])" } ) } - # ia64-specific information for code chunks my $ia64_locnum; my $ia64_outnum; |