X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FVMCore%2FGlobals.cpp;h=731f495c299d50d4036e02e5f41843396b0b65c0;hb=0b5b5e952c15c79c356a8a630e1c373693d1d993;hp=b84dbf7fd4a60131838bb50b766c53ffae0a4c48;hpb=551ccae044b0ff658fe629dd67edd5ffe75d10e8;p=oota-llvm.git diff --git a/lib/VMCore/Globals.cpp b/lib/VMCore/Globals.cpp index b84dbf7fd4a..731f495c299 100644 --- a/lib/VMCore/Globals.cpp +++ b/lib/VMCore/Globals.cpp @@ -106,9 +106,16 @@ void GlobalVariable::setName(const std::string &name, SymbolTable *ST) { if (P && hasName()) P->getSymbolTable().insert(this); } +void GlobalVariable::removeFromParent() { + getParent()->getGlobalList().remove(this); +} + +void GlobalVariable::eraseFromParent() { + getParent()->getGlobalList().erase(this); +} + void GlobalVariable::replaceUsesOfWithOnConstant(Value *From, Value *To, - bool DisableChecking ) -{ + bool DisableChecking) { // If you call this, then you better know this GVar has a constant // initializer worth replacing. Enforce that here. assert(getNumOperands() == 1 &&