diff options
-rw-r--r-- | BuildIR.hs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -135,8 +135,10 @@ internString :: String -> BuildM Ref internString str = do i <- genId let n = "__str_cnst_" ++ show i + ref' <- genTempForType TInt ref <- genTempForType TInt - addIns $ ILea ref n + addIns $ ILea ref' n + addIns $ IAri AAdd ref ref' (Constant (refSize ref') (fromIntegral $ sizeof TInt)) state $ \s -> (ref, s {internedStrings = internedStrings s ++ [(n, str)]}) |