Method AddGlobal
AddGlobal(ITypeRef, LazyEncodedString)
Adds a global to this module
GlobalVariable AddGlobal(ITypeRef typeRef, LazyEncodedString name)
Parameters
typeRef
ITypeRefType of the value
name
LazyEncodedStringName 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
ITypeRefType of the value
isConst
boolFlag to indicate if this global is a constant
linkage
LinkageLinkage type for this global
constVal
ConstantInitial 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
ITypeRefType of the value
isConst
boolFlag to indicate if this global is a constant
linkage
LinkageLinkage type for this global
constVal
ConstantInitial value for the global
name
LazyEncodedStringName of the variable
Returns
- GlobalVariable
New global variable