module AsmUtils
( sectionType
) where
import GhcPrelude
import GHC.Platform
import Outputable
sectionType :: String
-> SDoc
sectionType :: String -> SDoc
sectionType String
ty = (Platform -> SDoc) -> SDoc
sdocWithPlatform ((Platform -> SDoc) -> SDoc) -> (Platform -> SDoc) -> SDoc
forall a b. (a -> b) -> a -> b
$ \Platform
platform ->
case Platform -> Arch
platformArch Platform
platform of
ArchARM{} -> Char -> SDoc
char Char
'%' SDoc -> SDoc -> SDoc
<> String -> SDoc
text String
ty
Arch
_ -> Char -> SDoc
char Char
'@' SDoc -> SDoc -> SDoc
<> String -> SDoc
text String
ty