Shut GCC 4.0 up about classes with virtual functions but no virtual
authorReid Spencer <rspencer@reidspencer.com>
Sun, 24 Apr 2005 22:27:20 +0000 (22:27 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sun, 24 Apr 2005 22:27:20 +0000 (22:27 +0000)
destructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21510 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/ConstantFold.cpp

index 9ca8de302f1969c5c383b59edd5bd8926187a88d..98fcf1a32e43c005d8f8c4aef82ff424a2fdaaf8 100644 (file)
@@ -30,6 +30,7 @@ using namespace llvm;
 namespace {
   struct ConstRules {
     ConstRules() {}
+    virtual ~ConstRules() {}
 
     // Binary Operators...
     virtual Constant *add(const Constant *V1, const Constant *V2) const = 0;
@@ -86,6 +87,7 @@ namespace {
 template<class ArgType, class SubClassName>
 class TemplateRules : public ConstRules {
 
+
   //===--------------------------------------------------------------------===//
   // Redirecting functions that cast to the appropriate types
   //===--------------------------------------------------------------------===//
@@ -202,6 +204,9 @@ class TemplateRules : public ConstRules {
   static Constant *CastToDouble(const Constant *V) { return 0; }
   static Constant *CastToPointer(const Constant *,
                                  const PointerType *) {return 0;}
+
+public:
+  virtual ~TemplateRules() {}
 };