Library for interacting with LLVM IR in pure Go.
Library for interacting with LLVM IR in pure Go.
go get github.com/llir/llvm/...Map between llir/llvm tagged releases and LLVM release versions.
// This example parses an LLVM IR assembly file and pretty-prints the data types
// of the parsed module to standard output.
package main
import (
"log"
"github.com/kr/pretty"
"github.com/llir/llvm/asm"
)
func main() {
// Parse the LLVM IR assembly file `foo.ll`.
m, err := asm.ParseFile("foo.ll")
if err != nil {
log.Fatalf("%+v", err)
}
// Pretty-print the data types of the parsed LLVM IR module.
pretty.Println(m)
}………The llir/llvm project is dual-licensed to the public domain and under a zero-clause BSD license. You may choose either license to govern your use of llir/llvm.
No open issues yet, or sync has not completed.