[Git][ghc/ghc][master] Allow @ character in C labels

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Aug 14 18:29:15 UTC 2024



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


Commits:
2bb4156e by sheaf at 2024-08-14T14:28:56-04:00
Allow @ character in C labels

Generated symbol names can include the '@' character, for example when using
`__attribute__((vectorcall))`.
- - - - -


1 changed file:

- compiler/GHC/Types/ForeignCall.hs


Changes:

=====================================
compiler/GHC/Types/ForeignCall.hs
=====================================
@@ -189,7 +189,7 @@ isCLabelString :: CLabelString -> Bool  -- Checks to see if this is a valid C la
 isCLabelString lbl
   = all ok (unpackFS lbl)
   where
-    ok c = isAlphaNum c || c == '_' || c == '.'
+    ok c = isAlphaNum c || c == '_' || c == '.' || c == '@'
         -- The '.' appears in e.g. "foo.so" in the
         -- module part of a ExtName.  Maybe it should be separate
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2bb4156e106025bd776dae914bf82384d2f05165

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2bb4156e106025bd776dae914bf82384d2f05165
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/20240814/b99e9790/attachment.html>


More information about the ghc-commits mailing list