The noreturn GCC extension is now supported.
[oota-llvm.git] / lib / VMCore / Globals.cpp
index b84dbf7fd4a60131838bb50b766c53ffae0a4c48..731f495c299d50d4036e02e5f41843396b0b65c0 100644 (file)
@@ -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 &&