Skip to content

Unimplemented destructor in Operator.h causes issues with GCC 4.6 and C++0x #10240

@llvmbot

Description

@llvmbot
Bugzilla Link 9868
Resolution DUPLICATE
Resolved on May 07, 2011 14:47
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor

Extended Description


/// ConcreteOperator - A helper template for defining operators for individual
/// opcodes.
template<typename SuperClass, unsigned Opc>
class ConcreteOperator : public SuperClass {
~ConcreteOperator(); // DO NOT IMPLEMENT
public:
static inline bool classof(const ConcreteOperator<SuperClass, Opc> *) {
return true;
}
static inline bool classof(const Instruction *I) {
return I->getOpcode() == Opc;
}
static inline bool classof(const ConstantExpr *CE) {
return CE->getOpcode() == Opc;
}
static inline bool classof(const Value *V) {
return (isa(V) && classof(cast(V))) ||
(isa(V) && classof(cast(V)));
}
};

When including the Operator.h file and compiling with g++ 4.6 and C++0x is enabled (--std=c++0x) the not implemented destructor causes a compiler error. Commenting out the line fixes the issue, but I'm not sure if this is the right fix. Anyway it's not clear to me what's the rationale behind such constructor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilladuplicateResolved as duplicate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions