diff options
author | Cheng Shao <astrohavoc@gmail.com> | 2022-09-06 12:03:48 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-09-17 06:45:25 -0400 |
commit | 85431ac363e77dd0f93d46ff1ed450b4833c2a40 (patch) | |
tree | 1a9815a239b3cf2dd73acdd2ae6226e0eaa80b55 /compiler/GHC | |
parent | c9afe2216ccabd36e3083ec3b508310fcdb5eae3 (diff) | |
download | haskell-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.
Diffstat (limited to 'compiler/GHC')
-rw-r--r-- | compiler/GHC/Driver/Main.hs | 2 |
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", |