From 4fa32293c9d2658ce504b8fe6d909db2acf59983 Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Thu, 17 Jan 2019 13:34:32 +0100 Subject: Use ByteString to represent Cmm string literals (#16198) Also used ByteString in some other relevant places --- compiler/nativeGen/SPARC/Ppr.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/nativeGen/SPARC') 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) -- cgit v1.2.1