From a485c3c4049fff09e989bfd7d2ba47035c92a69b Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Wed, 25 Mar 2020 20:06:19 +0100 Subject: Move blob handling into StgToCmm Move handling of big literal strings from CmmToAsm to StgToCmm. It avoids the use of `sdocWithDynFlags` (cf #10143). We might need to move this handling even higher in the pipeline in the future (cf #17960): this patch will make it easier. --- compiler/GHC/Cmm/Utils.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler/GHC/Cmm/Utils.hs') diff --git a/compiler/GHC/Cmm/Utils.hs b/compiler/GHC/Cmm/Utils.hs index 00600c2d67..0b0c848eb7 100644 --- a/compiler/GHC/Cmm/Utils.hs +++ b/compiler/GHC/Cmm/Utils.hs @@ -195,10 +195,9 @@ zeroExpr platform = CmmLit (zeroCLit platform) mkWordCLit :: Platform -> Integer -> CmmLit mkWordCLit platform wd = CmmInt wd (wordWidth platform) +-- | We make a top-level decl for the string, and return a label pointing to it mkByteStringCLit :: CLabel -> ByteString -> (CmmLit, GenCmmDecl RawCmmStatics info stmt) --- We have to make a top-level decl for the string, --- and return a literal pointing to it mkByteStringCLit lbl bytes = (CmmLabel lbl, CmmData (Section sec lbl) $ RawCmmStatics lbl [CmmString bytes]) where -- cgit v1.2.1