Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

llvm

> 编程语言
Open source

Library for interacting with LLVM IR in pure Go.

1.3K stars0 likes1 views
WebsiteGitHub

About

Library for interacting with LLVM IR in pure Go.

llvm

Library for interacting with LLVM IR in pure Go.

Introduction

  • Introductory blog post "LLVM IR and Go"
  • Our Document

Installation

bash
go get github.com/llir/llvm/...

Versions

Map between llir/llvm tagged releases and LLVM release versions.

  • llir/llvm v0.3.7: LLVM 15.0 (yet to be released)
  • llir/llvm v0.3.6: LLVM 14.0
  • llir/llvm v0.3.5: LLVM 13.0
  • llir/llvm v0.3.4: LLVM 12.0
  • llir/llvm v0.3.3: LLVM 11.0
  • llir/llvm v0.3.2: LLVM 10.0
  • llir/llvm v0.3.0: LLVM 9.0

Users

  • decomp: LLVM IR to Go decompiler by @decomp.
  • geode: Geode to LLVM IR compiler by @nickwanninger.
  • leaven: LLVM IR to Go decompiler by @andybalholm.
  • slate: Slate to LLVM IR compiler by @nektro.
  • tre: Go to LLVM IR compiler by @zegl.
  • uc: µC to LLVM IR compiler by @sangisos and @mewmew.
  • B++: B++ to LLVM IR compiler by @Nv7-Github.

Usage

Input example, parsing LLVM IR assembly

Example usage in GoDoc.

go
// 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)
}

Output examples, producing LLVM IR assembly

Hello, World

Example usage in GoDoc.

…

Pseudo Random-Number Generator

Example usage in GoDoc.

…

Analysis example, processing LLVM IR

Example usage in GoDoc.

…

License

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.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gogogolangllvmllvm-ir

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言