Lines Matching defs:GlobalVariable
1 //===-- Globals.cpp - Implement the GlobalValue & GlobalVariable class ----===//
9 // This file implements the GlobalValue & GlobalVariable classes for the IR
20 #include "llvm/IR/GlobalVariable.h"
292 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(this))
348 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(this))
430 if (auto *Var = dyn_cast<GlobalVariable>(this))
438 // GlobalVariable Implementation
441 GlobalVariable::GlobalVariable(Type *Ty, bool constant, LinkageTypes Link,
446 OperandTraits<GlobalVariable>::op_begin(this),
455 "Initializer should be the same type as the GlobalVariable!");
460 GlobalVariable::GlobalVariable(Module &M, Type *Ty, bool constant,
462 const Twine &Name, GlobalVariable *Before,
466 : GlobalVariable(Ty, constant, Link, InitVal, Name, TLMode,
477 void GlobalVariable::removeFromParent() {
481 void GlobalVariable::eraseFromParent() {
485 void GlobalVariable::setInitializer(Constant *InitVal) {
496 "Initializer type must match GlobalVariable type");
506 /// Copy all additional attributes (those not needed to create a GlobalVariable)
507 /// from the GlobalVariable Src to this one.
508 void GlobalVariable::copyAttributesFrom(const GlobalVariable *Src) {
516 void GlobalVariable::dropAllReferences() {
521 void GlobalVariable::setCodeModel(CodeModel::Model CM) {