[LLVMbugs] [Bug 9868] New: Unimplemented destructor in Operator.h causes issues with GCC 4.6 and C++0x

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat May 7 12:12:32 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=9868

           Summary: Unimplemented destructor in Operator.h causes issues
                    with GCC 4.6 and C++0x
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: a.pignotti at sssup.it
                CC: llvmbugs at cs.uiuc.edu


--------------
/// 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<Instruction>(V) && classof(cast<Instruction>(V))) ||
           (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(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.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list