diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2019-01-17 13:34:32 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-01-31 12:46:51 -0500 |
commit | 4fa32293c9d2658ce504b8fe6d909db2acf59983 (patch) | |
tree | 6c7519fd6a320cbaf2264c2cbfdfe1eef0d70acc /compiler/nativeGen/SPARC | |
parent | deab6d64eac085b2e0ec68bfb3eeeda608dfb85a (diff) | |
download | haskell-4fa32293c9d2658ce504b8fe6d909db2acf59983.tar.gz |
Use ByteString to represent Cmm string literals (#16198)
Also used ByteString in some other relevant places
Diffstat (limited to 'compiler/nativeGen/SPARC')
-rw-r--r-- | compiler/nativeGen/SPARC/Ppr.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/nativeGen/SPARC/Ppr.hs b/compiler/nativeGen/SPARC/Ppr.hs index 7fc3e2111f..705fc31153 100644 --- a/compiler/nativeGen/SPARC/Ppr.hs +++ b/compiler/nativeGen/SPARC/Ppr.hs @@ -50,6 +50,7 @@ import Outputable import Platform import FastString import Data.Word +import qualified Data.ByteString as BS -- ----------------------------------------------------------------------------- -- Printing this stuff out @@ -110,7 +111,7 @@ pprDatas (Statics lbl dats) = vcat (pprLabel lbl : map pprData dats) pprData :: CmmStatic -> SDoc pprData (CmmString str) - = vcat (map do1 str) $$ do1 0 + = vcat (map do1 (BS.unpack str)) $$ do1 0 where do1 :: Word8 -> SDoc do1 w = text "\t.byte\t" <> int (fromIntegral w) |