llvm-pretty: A pretty printing library inspired by the llvm binding.

[ bsd3, library, text ] [ Propose Tags ]

A pretty printing library that was inspired by the LLVM binding by Lennart Augustsson. The library provides a monadic interface to a pretty printer, that allows functions to be defined and called, generating the corresponding LLVM assembly when run.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.2.0.0, 0.3.0.0, 0.3.1.0, 0.3.1.1, 0.4.0.0, 0.4.0.1, 0.5, 0.6.0.0, 0.7.0.0, 0.7.1.0, 0.7.1.1, 0.11.0, 0.12.0.0
Change log CHANGELOG.md
Dependencies base (>=4.9 && <5), containers (>=0.4), microlens (>=0.4), microlens-th (>=0.4), monadLib (>=3.6.1), parsec (>=3), pretty (>=1.0.1), syb (>=0.7), template-haskell (>=2.7), th-abstraction (>=0.3.1 && <0.7) [details]
License BSD-3-Clause
Author Trevor Elliott
Maintainer rscott@galois.com, kquick@galois.com
Category Text
Source repo head: git clone http://github.com/elliottt/llvm-pretty
Uploaded by ryanglscott at 2024-01-30T20:49:17Z
Distributions
Reverse Dependencies 5 direct, 0 indirect [details]
Downloads 9077 total (31 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-01-30 [all 1 reports]

Readme for llvm-pretty-0.12.0.0

[back to package description]

llvm-pretty

A pretty printing library that was inspired by the LLVM binding by Lennart Augustsson. The library provides a monadic interface to a pretty printer, that allows functions to be defined and called, generating the corresponding LLVM assembly when run.

LLVM language feature support

Currently, llvm-pretty supports LLVM versions up through 17. As a result of the broad version coverage, the llvm-pretty AST is a superset of all versions of the LLVM AST. This means that the manner in which certain information is presented in the llvm-pretty AST (e.g., during pretty printing) will be different depending on the LLVM version used to originate the information. Conversely, it is possible to construct an llvm-pretty AST that cannot be represented in a specific (or any) LLVM version.

llvm-pretty strives to support a reasonable variety of LLVM language features, but there are places where our coverage of the LLVM language is incomplete. If you need a LLVM feature that is not currently supported by llvm-pretty, please file an issue.

llvm-pretty versus llvm-pretty-bc-parser

llvm-pretty supports almost everything that one would want to do with LLVM ASTs. One notable exception is parsing: llvm-pretty deliberately does not support parsing an LLVM module AST from a bitcode file. This functionality is factored out into a separate llvm-pretty-bc-parser library. llvm-pretty-bc-parser generally tries to stay in sync with all of the LLVM language features that llvm-pretty supports, but it may be the case that some valid llvm-pretty ASTs cannot be parsed by llvm-pretty-bc-parser. If you encounter an occurrence of this issue, please file an issue at the llvm-pretty-bc-parser issue tracker.