summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonmar <unknown>2004-09-01 13:14:12 +0000
committersimonmar <unknown>2004-09-01 13:14:12 +0000
commit45ad1eec2c790673a6933f022c1f1b75fb87e312 (patch)
tree4784ba61734f799385256c5c3934fb03caffa0f5
parenta248007e1e2f6b86bcbbca757a4c0e5bfa37690d (diff)
downloadhaskell-45ad1eec2c790673a6933f022c1f1b75fb87e312.tar.gz
[project @ 2004-09-01 13:14:12 by simonmar]
Better fix for previous from Ian Lynagh.
-rw-r--r--ghc/driver/split/ghc-split.lprl8
1 files changed, 2 insertions, 6 deletions
diff --git a/ghc/driver/split/ghc-split.lprl b/ghc/driver/split/ghc-split.lprl
index 58c603ffa1..880ca9c8c2 100644
--- a/ghc/driver/split/ghc-split.lprl
+++ b/ghc/driver/split/ghc-split.lprl
@@ -45,13 +45,9 @@ sub split_asm_file {
# &tidy_up_and_die(1,"$Pgm: no split markers in .s file!\n")
# if $prologue_stuff eq $s_stuff;
- # about to use $Tmp_prefix in a regex - make sure backslashes don't get
- # interpreted in a strange way. ToDo: what about other regex
- # characters, eg. '.'?
- $Tmp_prefix =~ s/\\/\\\\/g;
-
# lie about where this stuff came from
- $prologue_stuff =~ s|"${Tmp_prefix}\.c"|"$ifile_root\.hc"|g;
+ # Note the \Q: this ignores regex meta-chars in $Tmp_prefix.
+ $prologue_stuff =~ s/\Q"$Tmp_prefix.c"/"$ifile_root.hc"/g;
while ( $_ ne '' ) { # not EOF
$octr++;