From 771f1acdcb913399ff3b70c83d4e5989d3295257 Mon Sep 17 00:00:00 2001
From: simonmar <unknown>
Date: Wed, 28 Jul 1999 14:10:09 +0000
Subject: [PATCH] [project @ 1999-07-28 14:10:09 by simonmar] Sigh, another go
 at getting #line directives right.

---
 ghc/utils/hscpp/hscpp.prl | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/ghc/utils/hscpp/hscpp.prl b/ghc/utils/hscpp/hscpp.prl
index e56ef269cedb..5c08b9b125f2 100644
--- a/ghc/utils/hscpp/hscpp.prl
+++ b/ghc/utils/hscpp/hscpp.prl
@@ -36,11 +36,10 @@ open(INPIPE, "$Cpp @args - <$file |")
 
 while (<INPIPE>) {
 
-# line directives come in flavo[u]rs:
+    s/^#\s*line\s+(\d+)\s+\"\"$/\{\-# LINE \1 \"$file\" \-\}/;
+    s/^#\s*(\d+)\s+\"\"/\{\-# LINE \1 \"$file\" \-\}/;
 
-    s/^#\s*line\s+(\d+)\s+(\"\")$//;
-    s/^#\s*(\d+)\s+(\"\").*//;  # these are a result of our using stdin in
-				# the $(CPP) command line above.
+# line directives come in flavo[u]rs:
 
 #   s/^#\s*line\s+\d+$/\{\-# LINE \-\}/;   IGNORE THIS ONE FOR NOW
     s/^#\s*line\s+(\d+)\s+(\".+\")$/\{\-# LINE \1 \2 \-\}/;
-- 
GitLab