Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!
[oota-llvm.git] / include / llvm / Argument.h
index c995043616c0d00054a695aa637695c9e303fed7..bb71e115fd0f13b9a8b1e6b0d4939dafdd9d5c07 100644 (file)
@@ -35,6 +35,11 @@ class Argument : public Value {  // Defined in the Function.cpp file
   friend class SymbolTableListTraits<Argument, Function>;
   void setParent(Function *parent);
 
+protected:
+  static void destroyThis(Argument*v) {
+    Value::destroyThis(v);
+  }
+  friend class Value;
 public:
   /// Argument ctor - If Function argument is specified, this argument is
   /// inserted at the end of the argument list for the function.