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

destructor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21510 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2005-04-24 22:27:20 +00:00
parent 628748650f
commit 2b2a528374

View 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() {}
};