Click or drag to resize
Llvm.NET LogoNativeModuleAddGlobal Method (ITypeRef, Boolean, Linkage, Constant)

[This is preliminary documentation and is subject to change.]

Adds a global to this module

Namespace:  Llvm.NET
Assembly:  Llvm.NET (in Llvm.NET.dll) Version: 3.8.6158
Syntax
C#
public GlobalVariable AddGlobal(
	ITypeRef typeRef,
	bool isConst,
	Linkage linkage,
	Constant constVal
)

Parameters

typeRef
Type: Llvm.NET.TypesITypeRef
Type of the global's value
isConst
Type: SystemBoolean
Flag to indicate if this global is a constant
linkage
Type: Llvm.NETLinkage
Linkage type for this global
constVal
Type: Llvm.NET.ValuesConstant
Initial value for the global

Return Value

Type: GlobalVariable
New global variable
See Also