MyNixOS website logo
Description

A pretty printing library inspired by the llvm binding.

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-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.

Metadata

Version

0.12.0.0

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows