MyNixOS website logo
Description

A low-level data interoperability binding for LLVM.

This package converts the LLVM IR (either bitcode files or LLVM assembly) into a Haskell data type (defined in llvm-base-types). The conversion uses the LLVM libraries to read bitcode. It then traverses the IR and produces a Haskell structure that can be pattern matched against in pure code. Note that this library works with LLVM 3.0-3.3. There are incompatible changes in this release relative to llvm-data-interop 0.2.0. See the changelog in llvm-analysis-0.3.0.

This package converts the LLVM IR (either bitcode files or LLVM assembly) into a Haskell data type (defined in llvm-base-types). The conversion uses the LLVM libraries to read bitcode. It then traverses the IR and produces a Haskell structure that can be pattern matched against in pure code.

After the conversion, no C++ data is referenced and no C++ code is called. This library does link against LLVM directly, and therefore also uses libstdc++. This can make linking tricky sometimes. For example, mixing template-haskell with C++-linked code does not seem to work.

Note that this library only works with LLVM 3.0-3.3, and will try to retain as much compatibility with future and past versions as is reasonable.

Installation Notes

  • Currently, this library is set up to link against the LLVM shared library (libLLVM-3.X.so). Most distro packages build the LLVM shared library. If you make a custom build, be sure to configure with --enable-shared.

Debian and Ubuntu

You need the development libraries and headers, so be sure to install the llvm-3.X-dev package, where X is the version you would like to use. You will also need clang.

Changes

v0.3.0

  • Support LLVM-3.3 (contributed by Patrick Hulin)
  • Minor breaking change in MetaDW*Type. These no longer have a MetaDWFile; instead, they directly contain their file and directory information.
Metadata

Version

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