GaloisInc / llvm-pretty

An llvm pretty printer inspired by the haskell llvm binding
Other
28 stars 15 forks source link

Use Fmt encapsulation and add LLVMPretty class #118

Closed kquick closed 1 year ago

kquick commented 1 year ago

Internally, the pretty-printing now uses a type alias Fmt to represent the operation that converts something to a Doc, with the presence of the Config implicit parameter. This allows standardization of the printing operation declarations as a precursor to making changes that affect all operations.

This also adds an LLVMPretty class so that the generic llvmPP method can be used to perform type-based dispatching to the appropriate pretty-printer. Currently, only the most prominently used instances are defined, but more will be coming in future changes.