Method AddGlobal
AddGlobal(ITypeRef, LazyEncodedString)
Adds a global to this module
public GlobalVariable AddGlobal(ITypeRef typeRef, LazyEncodedString name)
Parameters
typeRefITypeRefType of the value
nameLazyEncodedStringName of the global
Returns
- GlobalVariable
The new GlobalVariable
AddGlobal(ITypeRef, bool, Linkage, Constant)
Adds a global to this module
public GlobalVariable AddGlobal(ITypeRef typeRef, bool isConst, Linkage linkage, Constant constVal)
Parameters
typeRefITypeRefType of the value
isConstboolFlag to indicate if this global is a constant
linkageLinkageLinkage type for this global
constValConstantInitial value for the global
Returns
- GlobalVariable
New global variable
AddGlobal(ITypeRef, bool, Linkage, Constant, LazyEncodedString)
Adds a global to this module
public GlobalVariable AddGlobal(ITypeRef typeRef, bool isConst, Linkage linkage, Constant constVal, LazyEncodedString name)
Parameters
typeRefITypeRefType of the value
isConstboolFlag to indicate if this global is a constant
linkageLinkageLinkage type for this global
constValConstantInitial value for the global
nameLazyEncodedStringName of the variable
Returns
- GlobalVariable
New global variable