Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!
[oota-llvm.git] / include / llvm / GlobalVariable.h
index 00d4acb66daf53d5886cc5af540a8bfa74f4f59e..882dec68854f5df0a640c0d32d3ab32cdc765327 100644 (file)
@@ -45,6 +45,11 @@ class GlobalVariable : public GlobalValue {
   bool isThreadLocalSymbol : 1;        // Is this symbol "Thread Local"?
   Use Initializer;
 
+protected:
+  static void destroyThis(GlobalVariable*v) {
+    GlobalValue::destroyThis(v);
+  }
+  friend class Value;
 public:
   /// GlobalVariable ctor - If a parent module is specified, the global is
   /// automatically inserted into the end of the specified modules global list.