[llvm-commits] CVS: llvm/lib/VMCore/ConstantFolding.cpp

Reid Spencer reid at x10sys.com
Sun Apr 24 15:27:32 PDT 2005



Changes in directory llvm/lib/VMCore:

ConstantFolding.cpp updated: 1.73 -> 1.74
---
Log message:

Shut GCC 4.0 up about classes with virtual functions but no virtual 
destructor.


---
Diffs of the changes:  (+5 -0)

 ConstantFolding.cpp |    5 +++++
 1 files changed, 5 insertions(+)


Index: llvm/lib/VMCore/ConstantFolding.cpp
diff -u llvm/lib/VMCore/ConstantFolding.cpp:1.73 llvm/lib/VMCore/ConstantFolding.cpp:1.74
--- llvm/lib/VMCore/ConstantFolding.cpp:1.73	Thu Apr 21 18:46:51 2005
+++ llvm/lib/VMCore/ConstantFolding.cpp	Sun Apr 24 17:27:20 2005
@@ -30,6 +30,7 @@
 namespace {
   struct ConstRules {
     ConstRules() {}
+    virtual ~ConstRules() {}
 
     // Binary Operators...
     virtual Constant *add(const Constant *V1, const Constant *V2) const = 0;
@@ -86,6 +87,7 @@
 template<class ArgType, class SubClassName>
 class TemplateRules : public ConstRules {
 
+
   //===--------------------------------------------------------------------===//
   // Redirecting functions that cast to the appropriate types
   //===--------------------------------------------------------------------===//
@@ -202,6 +204,9 @@
   static Constant *CastToDouble(const Constant *V) { return 0; }
   static Constant *CastToPointer(const Constant *,
                                  const PointerType *) {return 0;}
+
+public:
+  virtual ~TemplateRules() {}
 };
 
 






More information about the llvm-commits mailing list