Skip to content

Commit

Permalink
print function types matching llvm
Browse files Browse the repository at this point in the history
  • Loading branch information
peterohanley committed Nov 26, 2024
1 parent 985932b commit f821469
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Text/LLVM/PP.hs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ ppType (PtrTo adr ty) = ppType ty <+> ppAddrSpace adr <> char '*'
ppType (PtrOpaque adr) = "ptr" <+> ppAddrSpace adr
ppType (Struct ts) = structBraces (commas (map ppType ts))
ppType (PackedStruct ts) = angles (structBraces (commas (map ppType ts)))
ppType (FunTy r as va) = ppType r <> ppArgList va (map ppType as)
ppType (FunTy r as va) = ppType r <+> ppArgList va (map ppType as)
ppType (Vector len pt) = angles (integral len <+> char 'x' <+> ppType pt)
ppType Opaque = "opaque"

Expand Down Expand Up @@ -405,7 +405,7 @@ ppDefine d = "define"
<+> ppMaybe (\gc -> "gc" <+> ppGC gc) (defGC d)
<+> ppMds (defMetadata d)
<+> char '{'
$+$ vcat (map ppBasicBlock (defBody d))
$+$ vcat (punctuate "" $ map ppBasicBlock (defBody d))
$+$ char '}'
where
ppMds mdm =
Expand Down Expand Up @@ -1390,7 +1390,7 @@ ppInt64ValMd' canFallBack pp = go


commas :: Fmt [Doc]
commas = fsep . punctuate comma
commas = hsep . punctuate comma

-- | Helpful for all of the optional fields that appear in the
-- metadata values
Expand Down

0 comments on commit f821469

Please sign in to comment.