diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-10-17 05:15:58 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-10-17 05:15:58 +0000 |
commit | fda458c2df6c282a4fbe335157676f7fa4117021 (patch) | |
tree | 3ea088409915713ce235a7f1f324f00b2590c05e /include/llvm/Operator.h | |
parent | 35a5640254d38fcdf73b22a839980aaacd437092 (diff) | |
download | external_llvm-fda458c2df6c282a4fbe335157676f7fa4117021.zip external_llvm-fda458c2df6c282a4fbe335157676f7fa4117021.tar.gz external_llvm-fda458c2df6c282a4fbe335157676f7fa4117021.tar.bz2 |
Remove LLVM_DELETED_FUNCTION from destructors that override non-deleted base class destructors. This isn't legal by the C++11 standard and clang now checks for it. Curiously gcc didn't catch this, possibly because of the template usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166089 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Operator.h')
-rw-r--r-- | include/llvm/Operator.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/include/llvm/Operator.h b/include/llvm/Operator.h index bc5da8e..462324a 100644 --- a/include/llvm/Operator.h +++ b/include/llvm/Operator.h @@ -36,8 +36,8 @@ private: void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION; void *operator new(size_t s) LLVM_DELETED_FUNCTION; Operator() LLVM_DELETED_FUNCTION; - // NOTE: cannot use LLVM_DELETED_FUNCTION because gcc errors when deleting - // an override of a non-deleted function. + // NOTE: cannot use LLVM_DELETED_FUNCTION because it's not legal to delete + // an overridden method that's not deleted in the base class. ~Operator(); public: @@ -191,7 +191,7 @@ public: /// opcodes. template<typename SuperClass, unsigned Opc> class ConcreteOperator : public SuperClass { - ~ConcreteOperator() LLVM_DELETED_FUNCTION; + ~ConcreteOperator(); // DO NOT IMPLEMENT public: static inline bool classof(const Instruction *I) { return I->getOpcode() == Opc; @@ -207,44 +207,44 @@ public: class AddOperator : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Add> { - ~AddOperator() LLVM_DELETED_FUNCTION; + ~AddOperator(); // DO NOT IMPLEMENT }; class SubOperator : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Sub> { - ~SubOperator() LLVM_DELETED_FUNCTION; + ~SubOperator(); // DO NOT IMPLEMENT }; class MulOperator : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Mul> { - ~MulOperator() LLVM_DELETED_FUNCTION; + ~MulOperator(); // DO NOT IMPLEMENT }; class ShlOperator : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Shl> { - ~ShlOperator() LLVM_DELETED_FUNCTION; + ~ShlOperator(); // DO NOT IMPLEMENT }; - + class SDivOperator : public ConcreteOperator<PossiblyExactOperator, Instruction::SDiv> { - ~SDivOperator() LLVM_DELETED_FUNCTION; + ~SDivOperator(); // DO NOT IMPLEMENT }; class UDivOperator : public ConcreteOperator<PossiblyExactOperator, Instruction::UDiv> { - ~UDivOperator() LLVM_DELETED_FUNCTION; + ~UDivOperator(); // DO NOT IMPLEMENT }; class AShrOperator : public ConcreteOperator<PossiblyExactOperator, Instruction::AShr> { - ~AShrOperator() LLVM_DELETED_FUNCTION; + ~AShrOperator(); // DO NOT IMPLEMENT }; class LShrOperator : public ConcreteOperator<PossiblyExactOperator, Instruction::LShr> { - ~LShrOperator() LLVM_DELETED_FUNCTION; + ~LShrOperator(); // DO NOT IMPLEMENT }; - - - + + + class GEPOperator : public ConcreteOperator<Operator, Instruction::GetElementPtr> { - ~GEPOperator() LLVM_DELETED_FUNCTION; + ~GEPOperator(); // DO NOT IMPLEMENT enum { IsInBounds = (1 << 0) |