Home | History | Annotate | Download | only in IR

Lines Matching refs:GlobalVariable

1 //===-- Globals.cpp - Implement the GlobalValue & GlobalVariable class ----===//
10 // This file implements the GlobalValue & GlobalVariable classes for the IR
20 #include "llvm/IR/GlobalVariable.h"
68 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(this))
81 // GlobalVariable Implementation
84 GlobalVariable::GlobalVariable(Type *Ty, bool constant, LinkageTypes Link,
91 OperandTraits<GlobalVariable>::op_begin(this),
97 "Initializer should be the same type as the GlobalVariable!");
104 GlobalVariable::GlobalVariable(Module &M, Type *Ty, bool constant,
107 GlobalVariable *Before, ThreadLocalMode TLMode,
112 OperandTraits<GlobalVariable>::op_begin(this),
118 "Initializer should be the same type as the GlobalVariable!");
130 void GlobalVariable::setParent(Module *parent) {
138 void GlobalVariable::removeFromParent() {
142 void GlobalVariable::eraseFromParent() {
146 void GlobalVariable::replaceUsesOfWithOnConstant(Value *From, Value *To,
166 void GlobalVariable::setInitializer(Constant *InitVal) {
174 "Initializer type must match GlobalVariable type");
182 /// create a GlobalVariable) from the GlobalVariable Src to this one.
183 void GlobalVariable::copyAttributesFrom(const GlobalValue *Src) {
184 assert(isa<GlobalVariable>(Src) && "Expected a GlobalVariable!");
186 const GlobalVariable *SrcVar = cast<GlobalVariable>(Src);