summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheng Shao <astrohavoc@gmail.com>2022-09-06 12:03:48 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-09-17 06:45:25 -0400
commit85431ac363e77dd0f93d46ff1ed450b4833c2a40 (patch)
tree1a9815a239b3cf2dd73acdd2ae6226e0eaa80b55
parentc9afe2216ccabd36e3083ec3b508310fcdb5eae3 (diff)
downloadhaskell-85431ac363e77dd0f93d46ff1ed450b4833c2a40.tar.gz
driver: pass original Cmm filename in ModLocation
When compiling Cmm, the ml_hs_file field is used to indicate Cmm filename when later generating DWARF information. We should pass the original filename here, otherwise for preprocessed Cmm files, the filename will be a temporary filename which is confusing.
-rw-r--r--compiler/GHC/Driver/Main.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs
index aa7fd59889..93d5bbf3c4 100644
--- a/compiler/GHC/Driver/Main.hs
+++ b/compiler/GHC/Driver/Main.hs
@@ -1866,7 +1866,7 @@ hscCompileCmmFile hsc_env original_filename filename output_filename = runHsc hs
rawCmms
return stub_c_exists
where
- no_loc = ModLocation{ ml_hs_file = Just filename,
+ no_loc = ModLocation{ ml_hs_file = Just original_filename,
ml_hi_file = panic "hscCompileCmmFile: no hi file",
ml_obj_file = panic "hscCompileCmmFile: no obj file",
ml_dyn_obj_file = panic "hscCompileCmmFile: no dyn obj file",