[Git][ghc/ghc][master] Display FFI labels (fix #18539)

Marge Bot gitlab at gitlab.haskell.org
Fri Dec 11 17:57:43 UTC 2020



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


Commits:
381eb660 by Sylvain Henry at 2020-12-11T12:57:35-05:00
Display FFI labels (fix #18539)

- - - - -


2 changed files:

- compiler/GHC/Types/ForeignCall.hs
- testsuite/tests/numeric/should_compile/all.T


Changes:

=====================================
compiler/GHC/Types/ForeignCall.hs
=====================================
@@ -206,24 +206,26 @@ instance Outputable CExportSpec where
 
 instance Outputable CCallSpec where
   ppr (CCallSpec fun cconv safety)
-    = hcat [ whenPprDebug callconv, ppr_fun fun ]
+    = hcat [ whenPprDebug callconv, ppr_fun fun, text " ::" ]
     where
       callconv = text "{-" <> ppr cconv <> text "-}"
 
-      gc_suf | playSafe safety = text "_GC"
-             | otherwise       = empty
+      gc_suf | playSafe safety = text "_safe"
+             | otherwise       = text "_unsafe"
 
-      ppr_fun (StaticTarget st _fn mPkgId isFun)
-        = text (if isFun then "__pkg_ccall"
-                         else "__pkg_ccall_value")
+      ppr_fun (StaticTarget st lbl mPkgId isFun)
+        = text (if isFun then "__ffi_static_ccall"
+                         else "__ffi_static_ccall_value")
        <> gc_suf
        <+> (case mPkgId of
             Nothing -> empty
             Just pkgId -> ppr pkgId)
+       <> text ":"
+       <> ppr lbl
        <+> (pprWithSourceText st empty)
 
       ppr_fun DynamicTarget
-        = text "__dyn_ccall" <> gc_suf <+> text "\"\""
+        = text "__ffi_dyn_ccall" <> gc_suf <+> text "\"\""
 
 -- The filename for a C header file
 -- Note [Pragma source text] in GHC.Types.SourceText


=====================================
testsuite/tests/numeric/should_compile/all.T
=====================================
@@ -8,4 +8,4 @@ test('T7881', normal, compile, [''])
 # desugaring, so we don't get the warning we expect.
 test('T8542', omit_ways(['hpc']), compile, [''])
 test('T10929', normal, compile, [''])
-test('T16402', [ grep_errmsg(r'and') ], compile, [''])
+test('T16402', [ grep_errmsg(r'and'), when(wordsize(32), expect_broken(19024)) ], compile, [''])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/381eb66012c2b1b9ef50008df57293fe443c2972

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/381eb66012c2b1b9ef50008df57293fe443c2972
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/20201211/e3217fa9/attachment-0001.html>


More information about the ghc-commits mailing list