module GHC.Utils.Asm
( sectionType
) where
import GHC.Prelude
import GHC.Platform
import GHC.Utils.Outputable
sectionType :: IsLine doc
=> Platform
-> String
-> doc
sectionType :: forall doc. IsLine doc => Platform -> String -> doc
sectionType Platform
platform String
ty =
case Platform -> Arch
platformArch Platform
platform of
ArchARM{} -> Char -> doc
forall doc. IsLine doc => Char -> doc
char Char
'%' doc -> doc -> doc
forall doc. IsLine doc => doc -> doc -> doc
<> String -> doc
forall doc. IsLine doc => String -> doc
text String
ty
Arch
_ -> Char -> doc
forall doc. IsLine doc => Char -> doc
char Char
'@' doc -> doc -> doc
forall doc. IsLine doc => doc -> doc -> doc
<> String -> doc
forall doc. IsLine doc => String -> doc
text String
ty