[Git][ghc/ghc][master] driver: pass original Cmm filename in ModLocation

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Sat Sep 17 10:45:43 UTC 2022



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
85431ac3 by Cheng Shao at 2022-09-17T06:45:25-04:00
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.

- - - - -


1 changed file:

- compiler/GHC/Driver/Main.hs


Changes:

=====================================
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",



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/85431ac363e77dd0f93d46ff1ed450b4833c2a40

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/85431ac363e77dd0f93d46ff1ed450b4833c2a40
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20220917/b28552f9/attachment-0001.html>


More information about the ghc-commits mailing list