-ppLlvmFunctionDecl dec = (text "declare") <+> ppLlvmFuncDecSig dec
-
--- | Print out a functions type signature.
--- This differs from [ppLlvmFunctionDecl] in that it is used for both function
--- declarations and defined functions to print out the type.
-ppLlvmFuncDecSig :: LlvmFunctionDecl -> Doc
-ppLlvmFuncDecSig (LlvmFunctionDecl name link cc retTy argTy params)
- = let linkTxt = show link
- linkDoc | linkTxt == "" = empty
- | otherwise = (text linkTxt) <> space
- ppParams = either ppCommaJoin ppCommaJoin params <>
- (case argTy of
- VarArgs -> (text ", ...")
- FixedArgs -> empty)
- in linkDoc <> (text $ show cc) <+> (text $ show retTy)
- <+> atsym <> (ftext name) <> lparen <+> ppParams <+> rparen