Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!
[oota-llvm.git] / include / llvm / GlobalAlias.h
index bbd19ba8816d802e8b382bdf462b93b949b31ec2..8b0dcf53158adba841060d2d98405875d28b1798 100644 (file)
@@ -43,6 +43,11 @@ class GlobalAlias : public GlobalValue {
   const GlobalAlias *getPrev() const { return Prev; }
 
   Use Aliasee;
+protected:
+  static void destroyThis(GlobalAlias*v) {
+    GlobalValue::destroyThis(v);
+  }
+  friend class Value;
 public:
   /// GlobalAlias ctor - If a parent module is specified, the alias is
   /// automatically inserted into the end of the specified module's alias list.