Table of Contents

Method AddGlobal

Namespace
Ubiquity.NET.Llvm
Assembly
Ubiquity.NET.Llvm.dll

AddGlobal(ITypeRef, LazyEncodedString)

Adds a global to this module

GlobalVariable AddGlobal(ITypeRef typeRef, LazyEncodedString name)

Parameters

typeRef ITypeRef

Type of the value

name LazyEncodedString

Name of the global

Returns

GlobalVariable

The new GlobalVariable

AddGlobal(ITypeRef, bool, Linkage, Constant)

Adds a global to this module

GlobalVariable AddGlobal(ITypeRef typeRef, bool isConst, Linkage linkage, Constant constVal)

Parameters

typeRef ITypeRef

Type of the value

isConst bool

Flag to indicate if this global is a constant

linkage Linkage

Linkage type for this global

constVal Constant

Initial value for the global

Returns

GlobalVariable

New global variable

AddGlobal(ITypeRef, bool, Linkage, Constant, LazyEncodedString)

Adds a global to this module

GlobalVariable AddGlobal(ITypeRef typeRef, bool isConst, Linkage linkage, Constant constVal, LazyEncodedString name)

Parameters

typeRef ITypeRef

Type of the value

isConst bool

Flag to indicate if this global is a constant

linkage Linkage

Linkage type for this global

constVal Constant

Initial value for the global

name LazyEncodedString

Name of the variable

Returns

GlobalVariable

New global variable