Comprehensive guides, tutorials, and references for LLVM tools and infrastructure
Get StartedStep-by-step guides for installing LLVM tools, setting up development environments.
View Getting Started Guide →Detailed documentation for LLVM libraries, command-line tools, and programmatic interfaces.
View API Reference →Learn to compile C/C++ to WebAssembly using LLVM's modern toolchain.
Read TutorialCreate custom LLVM optimization passes for code analysis and transformation.
Read TutorialExtend Clang with custom static analysis tools and code transformations.
Read Tutorial// llvm/docs/optimization-pass.cpp #include "llvm/Passes/Pass.h" #include "llvm/IR/Function.h" namespace { struct MyOptPass : public llvm::FunctionPass { static char ID; MyOptPass() : FunctionPass(id) {} bool runOnFunction(llvm::Function &F) override { // Implementation here return true; } }; } char MyOptPass::id = 0; static llvm::RegisterPassX("myopt", "Custom Optimization Pass");
Improve our documentation or add new guides to help the LLVM community.
Contribute to Documentation