LLVM
llvm.org › doxygen › classllvm_1_1Function.html
LLVM: llvm::Function Class Reference
Referenced by llvm::ilist_node_with_parent< llvm::BasicBlock, llvm::Function >. Definition at line 791 of file Function.h. References const, and InstIterator. Definition at line 791 of file Function.h. Definition at line 93 of file Function.h. Definition at line 131 of file Function.h. References hasLazyArguments(), and TargetLibraryInfoImpl. Referenced by TargetLibraryInfoImpl. The documentation for this class was generated from the following files: include/llvm/IR/Function.h ·
LLVM
llvm.org › doxygen › classllvm_1_1FunctionType.html
LLVM: llvm::FunctionType Class Reference
Class to represent function types. Definition at line 105 of file DerivedTypes.h. Definition at line 128 of file DerivedTypes.h. Methods for support type inquiry through isa, cast, and dyn_cast. Definition at line 147 of file DerivedTypes.h. References llvm::Type::FunctionTyID, T, and llvm::Type::Type().
Videos
19:34
LLVM IR C++ API: PHI Nodes, stack memory and printf - YouTube
22:16
2018 LLVM Developers’ Meeting: M. Spencer “Profile Guided ...
10:21
Programming Language with LLVM [3/20] Basic numbers | Main function ...
06:44
Programming Language with LLVM [4/20] Strings | Extern Calls - YouTube
Programming Language with LLVM [1/20] Introduction to ...
26:20
Write Your First LLVM FunctionPass for Instrumentation - YouTube
Hdoc
docs.hdoc.io › hdoc › llvm-project › rADBA2A8E0906EC47.html
class Function: LLVM/Clang 15.x documentation
This is an important base class in LLVM. It provides the common facilities of all constant values in an LLVM program. A constant is a value that is immutable at runtime. Functions are constants because their address is immutable. Same with global variables. All constants share the capabilities provided in this class.
LLVM
llvm.org › doxygen › classllvm_1_1Module.html
LLVM: llvm::Module Class Reference
Each module directly contains a list of globals variables, a list of functions, a list of libraries (or other modules) this module depends on, a symbol table, and various data about the target's characteristics. A module maintains a GlobalList object that is used to hold all constant references to global variables in the module. When a global variable is destroyed, it should have no entries in the GlobalList. The main container class for the LLVM Intermediate Representation.
Vu
few.vu.nl › ~lsc300 › LLVM › doxygen › classllvm_1_1Function.html
LLVM: llvm::Function Class Reference
References llvm::Value::FunctionVal, and llvm::Value::getValueID().
LLVM
llvm.org › doxygen › classllvm_1_1MachineFunction.html
LLVM: llvm::MachineFunction Class Reference
llvm · MachineFunction · Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members · llvm::MachineFunction Class Reference · #include "llvm/CodeGen/MachineFunction.h" Definition at line 295 of file MachineFunction.h.
Llvm-swift
llvm-swift.github.io › LLVMSwift › Classes › Function.html
Function Class Reference
A Function represents a named function body in LLVM IR source.
LLVM
llvm.org › docs › LangRef.html
LLVM Language Reference Manual — LLVM 23.0.0git documentation
May 12, 2026 - LLVM function definitions consist of the “define” keyword, an optional linkage type, an optional runtime preemption specifier, an optional visibility style, an optional DLL storage class, an optional calling convention, an optional unnamed_addr attribute, a return type, an optional parameter ...
LLVM
llvm.org › doxygen › classllvm_1_1Argument.html
LLVM: llvm::Argument Class Reference
This class represents an incoming formal argument to a Function.
LLVM
llvm.org › doxygen › classllvm_1_1FunctionPass.html
LLVM: llvm::FunctionPass Class Reference
FunctionPass class - This class is used to implement most global optimizations.
Google
chromium.googlesource.com › chromiumos › third_party › llvm › + › release_16 › include › llvm › Function.h
include/llvm/Function.h - chromiumos/third_party/llvm - Git at Google
chromium / chromiumos / third_party / llvm / release_16 / . / include / llvm / Function.h ·
LLVM
llvm.org › doxygen › classllvm_1_1Instruction.html
LLVM: llvm::Instruction Class Reference
References llvm::cast(). ... This function determines if the speficied instruction has the same "special" characteristics as the current one.
Top answer 1 of 2
6
You can create a new function with Function::Create. See this snippet from the LLVM tutorial for example:
Function *PrototypeAST::Codegen() {
// Make the function type: double(double,double) etc.
std::vector<Type*> Doubles(Args.size(),
Type::getDoubleTy(getGlobalContext()));
FunctionType *FT = FunctionType::get(Type::getDoubleTy(getGlobalContext()),
Doubles, false);
Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule);
2 of 2
-2
The function create: http://llvm.org/docs/doxygen/html/classllvm_1_1Function.html#a162a63c89ac118c8ffef75b3a892efa0
How to use the create function in the source code of llvm: http://llvm.org/docs/doxygen/html/CloneFunction_8cpp_source.html#l00162
LLVM
llvm.org › doxygen › classllvm_1_1Use.html
LLVM: llvm::Use Class Reference
Public Member Functions | Static Public Member Functions | Friends | List of all members · llvm::Use Class Reference · A Use represents the edge between a Value definition and its users. More... #include "llvm/IR/Use.h" A Use represents the edge between a Value definition and its users.
LLVM
llvm.org › docs › ProgrammersManual.html
LLVM Programmer’s Manual — LLVM 23.0.0git documentation
The handleErrors function takes an error as its first argument, followed by a variadic list of “handlers”, each of which must be a callable type (a function, lambda, or class with a call operator) with one argument. The handleErrors function will visit each handler in the sequence and check its argument type against the dynamic type of the error, running the first handler that matches.
Readthedocs
mapping-high-level-constructs-to-llvm-ir.readthedocs.io › en › latest › basic-constructs › functions.html
Function Definitions and Declarations — Mapping High Level Constructs to LLVM IR documentation
For LLVM these two are completely different functions, with different names etc. define i32 @_Z8functionii(i32 %a, i32 %b) #0 { ; [...] ret i32 %5 } define double @_Z8functionddd(double %a, double %b, double %x) #0 { ; [...] ret double %8 } Classes or structs are often passed around by value, implicitly cloning the objects when they are passed.
UCSD
cseweb.ucsd.edu › classes › fa15 › cse231-a › part1.html
CSE 231 - Part 1
November 3, 2025 - In LLVM, each pass is implemented in a separate C++ class that inherits from one of the subclasses of the Pass class: Hello subclasses FunctionPass, which implements functionality for analyses and optimizations that only look at a single function at a time.
LLVM
llvm.org › doxygen › classllvm_1_1function__ref.html
LLVM: llvm::function_ref< Fn > Class Template Reference
template<typename Fn> class llvm::function_ref< Fn >
LLVM
llvm.org › doxygen › classllvm_1_1MachineFunctionPass.html
LLVM: llvm::MachineFunctionPass Class Reference
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of passes that operate on the MachineFunction representation. More... ... Inherits llvm::FunctionPass.