Commit 8eac9b01 by Zachary Snow

use reg for empty args placeholder

parent 1fd72d87
...@@ -31,8 +31,7 @@ convertDescription other = other ...@@ -31,8 +31,7 @@ convertDescription other = other
traverseFunctionsM :: ModuleItem -> Writer Idents ModuleItem traverseFunctionsM :: ModuleItem -> Writer Idents ModuleItem
traverseFunctionsM (MIPackageItem (Function ml t f decls stmts)) = do traverseFunctionsM (MIPackageItem (Function ml t f decls stmts)) = do
let dummyDecl = Variable Input (Implicit Unspecified []) "_sv2v_unused" [] Nil decls' <-
decls' <- do
if any isInput decls if any isInput decls
then return decls then return decls
else do else do
...@@ -40,6 +39,8 @@ traverseFunctionsM (MIPackageItem (Function ml t f decls stmts)) = do ...@@ -40,6 +39,8 @@ traverseFunctionsM (MIPackageItem (Function ml t f decls stmts)) = do
return $ dummyDecl : decls return $ dummyDecl : decls
return $ MIPackageItem $ Function ml t f decls' stmts return $ MIPackageItem $ Function ml t f decls' stmts
where where
dummyType = IntegerVector TReg Unspecified []
dummyDecl = Variable Input dummyType "_sv2v_unused" [] Nil
isInput :: Decl -> Bool isInput :: Decl -> Bool
isInput (Variable Input _ _ _ _) = True isInput (Variable Input _ _ _ _) = True
isInput _ = False isInput _ = False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment