[llvm-commits] [llvm] r164091 - in /llvm/trunk/include/llvm: Constants.h IRBuilder.h InstrTypes.h Operator.h PassAnalysisSupport.h
Craig Topper
craig.topper at gmail.com
Mon Sep 17 19:05:46 PDT 2012
Author: ctopper
Date: Mon Sep 17 21:05:45 2012
New Revision: 164091
URL: http://llvm.org/viewvc/llvm-project?rev=164091&view=rev
Log:
Mark constructors, destructors, and operator new commented as 'do not implement' with LLVM_DELETED_FUNCTION instead.
Modified:
llvm/trunk/include/llvm/Constants.h
llvm/trunk/include/llvm/IRBuilder.h
llvm/trunk/include/llvm/InstrTypes.h
llvm/trunk/include/llvm/Operator.h
llvm/trunk/include/llvm/PassAnalysisSupport.h
Modified: llvm/trunk/include/llvm/Constants.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=164091&r1=164090&r2=164091&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Constants.h (original)
+++ llvm/trunk/include/llvm/Constants.h Mon Sep 17 21:05:45 2012
@@ -49,8 +49,8 @@
/// @brief Class for constant integers.
class ConstantInt : public Constant {
virtual void anchor();
- void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
- ConstantInt(const ConstantInt &); // DO NOT IMPLEMENT
+ void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
+ ConstantInt(const ConstantInt &) LLVM_DELETED_FUNCTION;
ConstantInt(IntegerType *Ty, const APInt& V);
APInt Val;
protected:
@@ -234,8 +234,8 @@
class ConstantFP : public Constant {
APFloat Val;
virtual void anchor();
- void *operator new(size_t, unsigned);// DO NOT IMPLEMENT
- ConstantFP(const ConstantFP &); // DO NOT IMPLEMENT
+ void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
+ ConstantFP(const ConstantFP &) LLVM_DELETED_FUNCTION;
friend class LLVMContextImpl;
protected:
ConstantFP(Type *Ty, const APFloat& V);
@@ -301,8 +301,8 @@
/// ConstantAggregateZero - All zero aggregate value
///
class ConstantAggregateZero : public Constant {
- void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
- ConstantAggregateZero(const ConstantAggregateZero &); // DO NOT IMPLEMENT
+ void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
+ ConstantAggregateZero(const ConstantAggregateZero &) LLVM_DELETED_FUNCTION;
protected:
explicit ConstantAggregateZero(Type *ty)
: Constant(ty, ConstantAggregateZeroVal, 0, 0) {}
@@ -346,7 +346,7 @@
///
class ConstantArray : public Constant {
friend struct ConstantArrayCreator<ConstantArray, ArrayType>;
- ConstantArray(const ConstantArray &); // DO NOT IMPLEMENT
+ ConstantArray(const ConstantArray &) LLVM_DELETED_FUNCTION;
protected:
ConstantArray(ArrayType *T, ArrayRef<Constant *> Val);
public:
@@ -385,7 +385,7 @@
//
class ConstantStruct : public Constant {
friend struct ConstantArrayCreator<ConstantStruct, StructType>;
- ConstantStruct(const ConstantStruct &); // DO NOT IMPLEMENT
+ ConstantStruct(const ConstantStruct &) LLVM_DELETED_FUNCTION;
protected:
ConstantStruct(StructType *T, ArrayRef<Constant *> Val);
public:
@@ -445,7 +445,7 @@
///
class ConstantVector : public Constant {
friend struct ConstantArrayCreator<ConstantVector, VectorType>;
- ConstantVector(const ConstantVector &); // DO NOT IMPLEMENT
+ ConstantVector(const ConstantVector &) LLVM_DELETED_FUNCTION;
protected:
ConstantVector(VectorType *T, ArrayRef<Constant *> Val);
public:
@@ -491,8 +491,8 @@
/// ConstantPointerNull - a constant pointer value that points to null
///
class ConstantPointerNull : public Constant {
- void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
- ConstantPointerNull(const ConstantPointerNull &); // DO NOT IMPLEMENT
+ void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
+ ConstantPointerNull(const ConstantPointerNull &) LLVM_DELETED_FUNCTION;
protected:
explicit ConstantPointerNull(PointerType *T)
: Constant(reinterpret_cast<Type*>(T),
@@ -543,8 +543,8 @@
/// element array of i8, or a 1-element array of i32. They'll both end up in
/// the same StringMap bucket, linked up.
ConstantDataSequential *Next;
- void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
- ConstantDataSequential(const ConstantDataSequential &); // DO NOT IMPLEMENT
+ void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
+ ConstantDataSequential(const ConstantDataSequential &) LLVM_DELETED_FUNCTION;
protected:
explicit ConstantDataSequential(Type *ty, ValueTy VT, const char *Data)
: Constant(ty, VT, 0, 0), DataElements(Data), Next(0) {}
@@ -655,8 +655,8 @@
/// operands because it stores all of the elements of the constant as densely
/// packed data, instead of as Value*'s.
class ConstantDataArray : public ConstantDataSequential {
- void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
- ConstantDataArray(const ConstantDataArray &); // DO NOT IMPLEMENT
+ void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
+ ConstantDataArray(const ConstantDataArray &) LLVM_DELETED_FUNCTION;
virtual void anchor();
friend class ConstantDataSequential;
explicit ConstantDataArray(Type *ty, const char *Data)
@@ -708,8 +708,8 @@
/// operands because it stores all of the elements of the constant as densely
/// packed data, instead of as Value*'s.
class ConstantDataVector : public ConstantDataSequential {
- void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
- ConstantDataVector(const ConstantDataVector &); // DO NOT IMPLEMENT
+ void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
+ ConstantDataVector(const ConstantDataVector &) LLVM_DELETED_FUNCTION;
virtual void anchor();
friend class ConstantDataSequential;
explicit ConstantDataVector(Type *ty, const char *Data)
@@ -760,7 +760,7 @@
/// BlockAddress - The address of a basic block.
///
class BlockAddress : public Constant {
- void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
+ void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
void *operator new(size_t s) { return User::operator new(s, 2); }
BlockAddress(Function *F, BasicBlock *BB);
public:
@@ -1125,8 +1125,8 @@
/// LangRef.html#undefvalues for details.
///
class UndefValue : public Constant {
- void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
- UndefValue(const UndefValue &); // DO NOT IMPLEMENT
+ void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
+ UndefValue(const UndefValue &) LLVM_DELETED_FUNCTION;
protected:
explicit UndefValue(Type *T) : Constant(T, UndefValueVal, 0, 0) {}
protected:
Modified: llvm/trunk/include/llvm/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IRBuilder.h?rev=164091&r1=164090&r2=164091&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/IRBuilder.h Mon Sep 17 21:05:45 2012
@@ -1052,7 +1052,7 @@
private:
// Provided to resolve 'CreateIntCast(Ptr, Ptr, "...")', giving a compile time
// error, instead of converting the string to bool for the isSigned parameter.
- Value *CreateIntCast(Value *, Type *, const char *); // DO NOT IMPLEMENT
+ Value *CreateIntCast(Value *, Type *, const char *) LLVM_DELETED_FUNCTION;
public:
Value *CreateFPCast(Value *V, Type *DestTy, const Twine &Name = "") {
if (V->getType() == DestTy)
Modified: llvm/trunk/include/llvm/InstrTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InstrTypes.h?rev=164091&r1=164090&r2=164091&view=diff
==============================================================================
--- llvm/trunk/include/llvm/InstrTypes.h (original)
+++ llvm/trunk/include/llvm/InstrTypes.h Mon Sep 17 21:05:45 2012
@@ -88,7 +88,7 @@
//===----------------------------------------------------------------------===//
class UnaryInstruction : public Instruction {
- void *operator new(size_t, unsigned); // Do not implement
+ void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
protected:
UnaryInstruction(Type *Ty, unsigned iType, Value *V,
@@ -138,7 +138,7 @@
//===----------------------------------------------------------------------===//
class BinaryOperator : public Instruction {
- void *operator new(size_t, unsigned); // Do not implement
+ void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
protected:
void init(BinaryOps iType);
BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty,
@@ -627,8 +627,8 @@
/// This class is the base class for the comparison instructions.
/// @brief Abstract base class of comparison instructions.
class CmpInst : public Instruction {
- void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
- CmpInst(); // do not implement
+ void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
+ CmpInst() LLVM_DELETED_FUNCTION;
protected:
CmpInst(Type *ty, Instruction::OtherOps op, unsigned short pred,
Value *LHS, Value *RHS, const Twine &Name = "",
Modified: llvm/trunk/include/llvm/Operator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Operator.h?rev=164091&r1=164090&r2=164091&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Operator.h (original)
+++ llvm/trunk/include/llvm/Operator.h Mon Sep 17 21:05:45 2012
@@ -32,10 +32,10 @@
private:
// Do not implement any of these. The Operator class is intended to be used
// as a utility, and is never itself instantiated.
- void *operator new(size_t, unsigned);
- void *operator new(size_t s);
- Operator();
- ~Operator();
+ void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
+ void *operator new(size_t s) LLVM_DELETED_FUNCTION;
+ Operator() LLVM_DELETED_FUNCTION;
+ ~Operator() LLVM_DELETED_FUNCTION;
public:
/// getOpcode - Return the opcode for this Instruction or ConstantExpr.
@@ -77,7 +77,7 @@
};
private:
- ~OverflowingBinaryOperator(); // do not implement
+ ~OverflowingBinaryOperator() LLVM_DELETED_FUNCTION;
friend class BinaryOperator;
friend class ConstantExpr;
@@ -131,7 +131,7 @@
};
private:
- ~PossiblyExactOperator(); // do not implement
+ ~PossiblyExactOperator() LLVM_DELETED_FUNCTION;
friend class BinaryOperator;
friend class ConstantExpr;
@@ -168,7 +168,7 @@
/// information about relaxed accuracy requirements attached to them.
class FPMathOperator : public Operator {
private:
- ~FPMathOperator(); // do not implement
+ ~FPMathOperator() LLVM_DELETED_FUNCTION;
public:
@@ -191,7 +191,7 @@
/// opcodes.
template<typename SuperClass, unsigned Opc>
class ConcreteOperator : public SuperClass {
- ~ConcreteOperator(); // DO NOT IMPLEMENT
+ ~ConcreteOperator() LLVM_DELETED_FUNCTION;
public:
static inline bool classof(const ConcreteOperator<SuperClass, Opc> *) {
return true;
@@ -210,44 +210,44 @@
class AddOperator
: public ConcreteOperator<OverflowingBinaryOperator, Instruction::Add> {
- ~AddOperator(); // DO NOT IMPLEMENT
+ ~AddOperator() LLVM_DELETED_FUNCTION;
};
class SubOperator
: public ConcreteOperator<OverflowingBinaryOperator, Instruction::Sub> {
- ~SubOperator(); // DO NOT IMPLEMENT
+ ~SubOperator() LLVM_DELETED_FUNCTION;
};
class MulOperator
: public ConcreteOperator<OverflowingBinaryOperator, Instruction::Mul> {
- ~MulOperator(); // DO NOT IMPLEMENT
+ ~MulOperator() LLVM_DELETED_FUNCTION;
};
class ShlOperator
: public ConcreteOperator<OverflowingBinaryOperator, Instruction::Shl> {
- ~ShlOperator(); // DO NOT IMPLEMENT
+ ~ShlOperator() LLVM_DELETED_FUNCTION;
};
class SDivOperator
: public ConcreteOperator<PossiblyExactOperator, Instruction::SDiv> {
- ~SDivOperator(); // DO NOT IMPLEMENT
+ ~SDivOperator() LLVM_DELETED_FUNCTION;
};
class UDivOperator
: public ConcreteOperator<PossiblyExactOperator, Instruction::UDiv> {
- ~UDivOperator(); // DO NOT IMPLEMENT
+ ~UDivOperator() LLVM_DELETED_FUNCTION;
};
class AShrOperator
: public ConcreteOperator<PossiblyExactOperator, Instruction::AShr> {
- ~AShrOperator(); // DO NOT IMPLEMENT
+ ~AShrOperator() LLVM_DELETED_FUNCTION;
};
class LShrOperator
: public ConcreteOperator<PossiblyExactOperator, Instruction::LShr> {
- ~LShrOperator(); // DO NOT IMPLEMENT
+ ~LShrOperator() LLVM_DELETED_FUNCTION;
};
class GEPOperator
: public ConcreteOperator<Operator, Instruction::GetElementPtr> {
- ~GEPOperator(); // DO NOT IMPLEMENT
+ ~GEPOperator() LLVM_DELETED_FUNCTION;
enum {
IsInBounds = (1 << 0)
Modified: llvm/trunk/include/llvm/PassAnalysisSupport.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassAnalysisSupport.h?rev=164091&r1=164090&r2=164091&view=diff
==============================================================================
--- llvm/trunk/include/llvm/PassAnalysisSupport.h (original)
+++ llvm/trunk/include/llvm/PassAnalysisSupport.h Mon Sep 17 21:05:45 2012
@@ -120,7 +120,7 @@
class PMDataManager;
class AnalysisResolver {
private:
- AnalysisResolver(); // DO NOT IMPLEMENT
+ AnalysisResolver() LLVM_DELETED_FUNCTION;
public:
explicit AnalysisResolver(PMDataManager &P) : PM(P) { }
More information about the llvm-commits
mailing list