on master help sign in
Some clean up.

Remove unused variable. Fix indenting in produced code.

commitc707c2d13b24c4a9375e95ba772048adf2d9c365 authorniklas <niklas@mm.st> dateSun 18 May 2014, 16:20 (12 years ago) parentd581842
1 file changed+3−4
src/IRTS/CodegenC.hs+3−4
src/IRTS/CodegenC.hs+3−4
@@ -62,7 +62,6 @@ codegenC' defs out exec incs objs libs flags dbg
6262 hPutStr tmph cout
6363 hFlush tmph
6464 hClose tmph
65− let useclang = False
6665 comp <- getCC
6766 libFlags <- getLibFlags
6867 incFlags <- getIncFlags
@@ -175,15 +174,15 @@ bcc i (CASE True r code def)
175174 | length code < 4 = showCase i def code
176175 where
177176 showCode :: Int -> [BC] -> String
178− showCode i bc = "{\n" ++ indent i ++ concatMap (bcc (i + 1)) bc ++
177+ showCode i bc = "{\n" ++ concatMap (bcc (i + 1)) bc ++
179178 indent i ++ "}\n"
180179
181180 showCase :: Int -> Maybe [BC] -> [(Int, [BC])] -> String
182181 showCase i Nothing [(t, c)] = showCode i c
183182 showCase i (Just def) [] = showCode i def
184183 showCase i def ((t, c) : cs)
185− = "if (CTAG(" ++ creg r ++ ") == " ++ show t ++ ") " ++ showCode i c
186− ++ "else " ++ showCase i def cs
184+ = indent i ++ "if (CTAG(" ++ creg r ++ ") == " ++ show t ++ ") " ++ showCode i c
185+ ++ indent i ++ "else " ++ showCase i def cs
187186
188187bcc i (CASE safe r code def)
189188 = indent i ++ "switch(" ++ ctag safe ++ "(" ++ creg r ++ ")) {\n" ++