packages feed

llvm-hs-pretty 0.6.1.0 → 0.6.2.0

raw patch · 2 files changed

+27/−6 lines, 2 filesdep ~llvm-hsdep ~llvm-hs-purePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: llvm-hs, llvm-hs-pure

API changes (from Hackage documentation)

+ LLVM.Pretty: instance Data.Text.Prettyprint.Doc.Internal.Pretty LLVM.AST.Operand.DebugNameTableKind

Files

llvm-hs-pretty.cabal view
@@ -1,5 +1,5 @@ name:                llvm-hs-pretty-version:             0.6.1.0+version:             0.6.2.0 license:             MIT synopsis:            A pretty printer for LLVM IR.  description:         A pretty printer for the LLVM AST types provided by llvm-hs.@@ -29,7 +29,7 @@     array                >= 0.5,     base                 >= 4.6   && < 5.0,     bytestring           >= 0.10,-    llvm-hs-pure         >= 7.0,+    llvm-hs-pure         >= 8.0,     text                 >= 0.1,     prettyprinter        >= 1.2 @@ -50,5 +50,5 @@     tasty-hunit          -any,     tasty-golden         >= 1.1,     llvm-hs-pretty       -any,-    llvm-hs              >= 7.0,-    llvm-hs-pure         >= 7.0+    llvm-hs              >= 8.0,+    llvm-hs-pure         >= 8.0
src/LLVM/Pretty.hs view
@@ -652,6 +652,17 @@   DW_OP_Mul -> ["DW_OP_mul"]   DW_OP_Deref -> ["DW_OP_deref"]   DW_OP_XDeref -> ["DW_OP_xderef"]+  DW_OP_Lit0 -> ["DW_OP_Lit0"]+  DW_OP_Div -> ["DW_OP_Div"]+  DW_OP_Mod -> ["DW_OP_Mod"]+  DW_OP_Not -> ["DW_OP_Not"]+  DW_OP_Or -> ["DW_OP_Or"]+  DW_OP_Xor -> ["DW_OP_Xor"]+  DW_OP_And -> ["DW_OP_And"]+  DW_OP_Shr -> ["DW_OP_Shr"]+  DW_OP_Shra -> ["DW_OP_Shra"]+  DW_OP_Shl -> ["DW_OP_Shl"]+  DW_OP_Dup -> ["DW_OP_Dup"]  instance Pretty DIGlobalVariableExpression where   pretty e = ppDINode "DIGlobalVariableExpression"@@ -773,7 +784,8 @@     , ("dwoId", Just (pretty dWOId))     , ("splitDebugInlining", Just (ppBoolean splitDebugInlining))     , ("debugInfoForProfiling", Just (ppBoolean debugInfoForProfiling))-    , ("gnuPubnames", Just (ppBoolean gnuPubnames))+    , ("nameTableKind", Just (pretty nameTableKind))+    , ("debugBaseAddress", Just (ppBoolean debugBaseAddress))     ]  instance Pretty DebugEmissionKind where@@ -880,6 +892,7 @@   pretty e = case e of     AddressEncoding -> "DW_ATE_address"     BooleanEncoding -> "DW_ATE_boolean"+    UTFEncoding -> "DW_ATE_UTF"     FloatEncoding -> "DW_ATE_float"     SignedEncoding -> "DW_ATE_signed"     SignedCharEncoding -> "DW_ATE_signed_char"@@ -1202,6 +1215,12 @@ instance Pretty DataLayout where   pretty x = pretty (BL.unpack (dataLayoutToString x)) +instance Pretty DebugNameTableKind where+  pretty = \case+    NameTableKindDefault -> "Default"+    NameTableKindGNU -> "GNU"+    NameTableKindNone -> "None"+ -- ------------------------------------------------------------------------------- -- -- Special Case Hacks -- -------------------------------------------------------------------------------@@ -1262,7 +1281,9 @@   = tail <+> "call" <+> pretty callingConvention <+> ppReturnAttributes returnAttributes <+> pretty resultType <+> ftype     <+> pretty f <> parens (commas $ fmap ppArguments arguments) <+> ppFunctionAttributes functionAttributes     where-      (functionType@FunctionType {..}) = referencedType (typeOf f)+      (functionType@FunctionType {..}) = case (referencedType (typeOf f)) of+                                           fty@FunctionType {..} -> fty+                                           _ -> error "Calling non function type"       ftype = if isVarArg               then ppFunctionArgumentTypes functionType               else mempty