mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[IR] Added operator delete to subclasses of User to avoid UB
Several subclasses of User override operator new without also overriding operator delete. This means that delete expressions fall back to using operator delete of the base class, which would be User. However, this is only allowed if the base class has a virtual destructor which is not the case for User, so this is UB. See also [expr.delete] (3) for the exact wording. This is actually detected in some cases by GCC 11's -Wmismatched-new-delete now which is how I found this error. Differential Revision: https://reviews.llvm.org/D103143
This commit is contained in:
parent
18736d1b57
commit
2f6870edd6
@ -329,7 +329,8 @@ public:
|
|||||||
/*NumOperands=*/1) {}
|
/*NumOperands=*/1) {}
|
||||||
|
|
||||||
// allocate space for exactly one operand
|
// allocate space for exactly one operand
|
||||||
void *operator new(size_t s) { return User::operator new(s, 1); }
|
void *operator new(size_t S) { return User::operator new(S, 1); }
|
||||||
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
|
|
||||||
static bool classof(const Value *MA) {
|
static bool classof(const Value *MA) {
|
||||||
return MA->getValueID() == MemoryUseVal;
|
return MA->getValueID() == MemoryUseVal;
|
||||||
@ -389,7 +390,8 @@ public:
|
|||||||
ID(Ver) {}
|
ID(Ver) {}
|
||||||
|
|
||||||
// allocate space for exactly two operands
|
// allocate space for exactly two operands
|
||||||
void *operator new(size_t s) { return User::operator new(s, 2); }
|
void *operator new(size_t S) { return User::operator new(S, 2); }
|
||||||
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
|
|
||||||
static bool classof(const Value *MA) {
|
static bool classof(const Value *MA) {
|
||||||
return MA->getValueID() == MemoryDefVal;
|
return MA->getValueID() == MemoryDefVal;
|
||||||
@ -484,9 +486,11 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(MemoryUseOrDef, MemoryAccess)
|
|||||||
/// issue.
|
/// issue.
|
||||||
class MemoryPhi final : public MemoryAccess {
|
class MemoryPhi final : public MemoryAccess {
|
||||||
// allocate space for exactly zero operands
|
// allocate space for exactly zero operands
|
||||||
void *operator new(size_t s) { return User::operator new(s); }
|
void *operator new(size_t S) { return User::operator new(S); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
|
|
||||||
/// Provide fast operand accessors
|
/// Provide fast operand accessors
|
||||||
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(MemoryAccess);
|
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(MemoryAccess);
|
||||||
|
|
||||||
|
@ -58,9 +58,11 @@ class ConstantData : public Constant {
|
|||||||
protected:
|
protected:
|
||||||
explicit ConstantData(Type *Ty, ValueTy VT) : Constant(Ty, VT, nullptr, 0) {}
|
explicit ConstantData(Type *Ty, ValueTy VT) : Constant(Ty, VT, nullptr, 0) {}
|
||||||
|
|
||||||
void *operator new(size_t s) { return User::operator new(s, 0); }
|
void *operator new(size_t S) { return User::operator new(S, 0); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
|
|
||||||
ConstantData(const ConstantData &) = delete;
|
ConstantData(const ConstantData &) = delete;
|
||||||
|
|
||||||
/// Methods to support type inquiry through isa, cast, and dyn_cast.
|
/// Methods to support type inquiry through isa, cast, and dyn_cast.
|
||||||
@ -849,12 +851,14 @@ class BlockAddress final : public Constant {
|
|||||||
|
|
||||||
BlockAddress(Function *F, BasicBlock *BB);
|
BlockAddress(Function *F, BasicBlock *BB);
|
||||||
|
|
||||||
void *operator new(size_t s) { return User::operator new(s, 2); }
|
void *operator new(size_t S) { return User::operator new(S, 2); }
|
||||||
|
|
||||||
void destroyConstantImpl();
|
void destroyConstantImpl();
|
||||||
Value *handleOperandChangeImpl(Value *From, Value *To);
|
Value *handleOperandChangeImpl(Value *From, Value *To);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
|
|
||||||
/// Return a BlockAddress for the specified function and basic block.
|
/// Return a BlockAddress for the specified function and basic block.
|
||||||
static BlockAddress *get(Function *F, BasicBlock *BB);
|
static BlockAddress *get(Function *F, BasicBlock *BB);
|
||||||
|
|
||||||
@ -893,12 +897,14 @@ class DSOLocalEquivalent final : public Constant {
|
|||||||
|
|
||||||
DSOLocalEquivalent(GlobalValue *GV);
|
DSOLocalEquivalent(GlobalValue *GV);
|
||||||
|
|
||||||
void *operator new(size_t s) { return User::operator new(s, 1); }
|
void *operator new(size_t S) { return User::operator new(S, 1); }
|
||||||
|
|
||||||
void destroyConstantImpl();
|
void destroyConstantImpl();
|
||||||
Value *handleOperandChangeImpl(Value *From, Value *To);
|
Value *handleOperandChangeImpl(Value *From, Value *To);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
|
|
||||||
/// Return a DSOLocalEquivalent for the specified global value.
|
/// Return a DSOLocalEquivalent for the specified global value.
|
||||||
static DSOLocalEquivalent *get(GlobalValue *GV);
|
static DSOLocalEquivalent *get(GlobalValue *GV);
|
||||||
|
|
||||||
|
@ -35,9 +35,8 @@ public:
|
|||||||
GlobalIndirectSymbol &operator=(const GlobalIndirectSymbol &) = delete;
|
GlobalIndirectSymbol &operator=(const GlobalIndirectSymbol &) = delete;
|
||||||
|
|
||||||
// allocate space for exactly one operand
|
// allocate space for exactly one operand
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 1); }
|
||||||
return User::operator new(s, 1);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
/// Provide fast operand accessors
|
/// Provide fast operand accessors
|
||||||
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant);
|
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant);
|
||||||
|
@ -68,9 +68,8 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly one operand
|
// allocate space for exactly one operand
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 1); }
|
||||||
return User::operator new(s, 1);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
/// Transparently provide more efficient getOperand methods.
|
/// Transparently provide more efficient getOperand methods.
|
||||||
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
||||||
@ -203,9 +202,8 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly two operands
|
// allocate space for exactly two operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 2); }
|
||||||
return User::operator new(s, 2);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
/// Transparently provide more efficient getOperand methods.
|
/// Transparently provide more efficient getOperand methods.
|
||||||
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
||||||
@ -769,9 +767,8 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly two operands
|
// allocate space for exactly two operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 2); }
|
||||||
return User::operator new(s, 2);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
/// Construct a compare instruction, given the opcode, the predicate and
|
/// Construct a compare instruction, given the opcode, the predicate and
|
||||||
/// the two operands. Optionally (if InstBefore is specified) insert the
|
/// the two operands. Optionally (if InstBefore is specified) insert the
|
||||||
|
@ -333,9 +333,8 @@ public:
|
|||||||
AtomicOrdering Order, SyncScope::ID SSID, BasicBlock *InsertAtEnd);
|
AtomicOrdering Order, SyncScope::ID SSID, BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
// allocate space for exactly two operands
|
// allocate space for exactly two operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 2); }
|
||||||
return User::operator new(s, 2);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
/// Return true if this is a store to a volatile memory location.
|
/// Return true if this is a store to a volatile memory location.
|
||||||
bool isVolatile() const { return getSubclassData<VolatileField>(); }
|
bool isVolatile() const { return getSubclassData<VolatileField>(); }
|
||||||
@ -463,9 +462,8 @@ public:
|
|||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
// allocate space for exactly zero operands
|
// allocate space for exactly zero operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 0); }
|
||||||
return User::operator new(s, 0);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the ordering constraint of this fence instruction.
|
/// Returns the ordering constraint of this fence instruction.
|
||||||
AtomicOrdering getOrdering() const {
|
AtomicOrdering getOrdering() const {
|
||||||
@ -547,9 +545,8 @@ public:
|
|||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
// allocate space for exactly three operands
|
// allocate space for exactly three operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 3); }
|
||||||
return User::operator new(s, 3);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
using VolatileField = BoolBitfieldElementT<0>;
|
using VolatileField = BoolBitfieldElementT<0>;
|
||||||
using WeakField = BoolBitfieldElementT<VolatileField::NextBit>;
|
using WeakField = BoolBitfieldElementT<VolatileField::NextBit>;
|
||||||
@ -792,9 +789,8 @@ public:
|
|||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
// allocate space for exactly two operands
|
// allocate space for exactly two operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 2); }
|
||||||
return User::operator new(s, 2);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
using VolatileField = BoolBitfieldElementT<0>;
|
using VolatileField = BoolBitfieldElementT<0>;
|
||||||
using AtomicOrderingField =
|
using AtomicOrderingField =
|
||||||
@ -2040,7 +2036,8 @@ public:
|
|||||||
ShuffleVectorInst(Value *V1, Value *V2, ArrayRef<int> Mask,
|
ShuffleVectorInst(Value *V1, Value *V2, ArrayRef<int> Mask,
|
||||||
const Twine &NameStr, BasicBlock *InsertAtEnd);
|
const Twine &NameStr, BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
void *operator new(size_t s) { return User::operator new(s, 2); }
|
void *operator new(size_t S) { return User::operator new(S, 2); }
|
||||||
|
void operator delete(void *Ptr) { return User::operator delete(Ptr); }
|
||||||
|
|
||||||
/// Swap the operands and adjust the mask to preserve the semantics
|
/// Swap the operands and adjust the mask to preserve the semantics
|
||||||
/// of the instruction.
|
/// of the instruction.
|
||||||
@ -2497,9 +2494,8 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly two operands
|
// allocate space for exactly two operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 2); }
|
||||||
return User::operator new(s, 2);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
static InsertValueInst *Create(Value *Agg, Value *Val,
|
static InsertValueInst *Create(Value *Agg, Value *Val,
|
||||||
ArrayRef<unsigned> Idxs,
|
ArrayRef<unsigned> Idxs,
|
||||||
@ -2875,9 +2871,7 @@ private:
|
|||||||
const Twine &NameStr, BasicBlock *InsertAtEnd);
|
const Twine &NameStr, BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
// Allocate space for exactly zero operands.
|
// Allocate space for exactly zero operands.
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S); }
|
||||||
return User::operator new(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
void growOperands(unsigned Size);
|
void growOperands(unsigned Size);
|
||||||
void init(unsigned NumReservedValues, const Twine &NameStr);
|
void init(unsigned NumReservedValues, const Twine &NameStr);
|
||||||
@ -2889,6 +2883,8 @@ protected:
|
|||||||
LandingPadInst *cloneImpl() const;
|
LandingPadInst *cloneImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
|
|
||||||
/// Constructors - NumReservedClauses is a hint for the number of incoming
|
/// Constructors - NumReservedClauses is a hint for the number of incoming
|
||||||
/// clauses that this landingpad will have (use 0 if you really have no idea).
|
/// clauses that this landingpad will have (use 0 if you really have no idea).
|
||||||
static LandingPadInst *Create(Type *RetTy, unsigned NumReservedClauses,
|
static LandingPadInst *Create(Type *RetTy, unsigned NumReservedClauses,
|
||||||
@ -3207,9 +3203,7 @@ class SwitchInst : public Instruction {
|
|||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
// allocate space for exactly zero operands
|
// allocate space for exactly zero operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S); }
|
||||||
return User::operator new(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
void init(Value *Value, BasicBlock *Default, unsigned NumReserved);
|
void init(Value *Value, BasicBlock *Default, unsigned NumReserved);
|
||||||
void growOperands();
|
void growOperands();
|
||||||
@ -3221,6 +3215,8 @@ protected:
|
|||||||
SwitchInst *cloneImpl() const;
|
SwitchInst *cloneImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
|
|
||||||
// -2
|
// -2
|
||||||
static const unsigned DefaultPseudoIndex = static_cast<unsigned>(~0L-1);
|
static const unsigned DefaultPseudoIndex = static_cast<unsigned>(~0L-1);
|
||||||
|
|
||||||
@ -3605,9 +3601,7 @@ class IndirectBrInst : public Instruction {
|
|||||||
IndirectBrInst(Value *Address, unsigned NumDests, BasicBlock *InsertAtEnd);
|
IndirectBrInst(Value *Address, unsigned NumDests, BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
// allocate space for exactly zero operands
|
// allocate space for exactly zero operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S); }
|
||||||
return User::operator new(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
void init(Value *Address, unsigned NumDests);
|
void init(Value *Address, unsigned NumDests);
|
||||||
void growOperands();
|
void growOperands();
|
||||||
@ -3619,6 +3613,8 @@ protected:
|
|||||||
IndirectBrInst *cloneImpl() const;
|
IndirectBrInst *cloneImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
|
|
||||||
/// Iterator type that casts an operand to a basic block.
|
/// Iterator type that casts an operand to a basic block.
|
||||||
///
|
///
|
||||||
/// This only makes sense because the successors are stored as adjacent
|
/// This only makes sense because the successors are stored as adjacent
|
||||||
@ -4256,7 +4252,7 @@ class CatchSwitchInst : public Instruction {
|
|||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
// allocate space for exactly zero operands
|
// allocate space for exactly zero operands
|
||||||
void *operator new(size_t s) { return User::operator new(s); }
|
void *operator new(size_t S) { return User::operator new(S); }
|
||||||
|
|
||||||
void init(Value *ParentPad, BasicBlock *UnwindDest, unsigned NumReserved);
|
void init(Value *ParentPad, BasicBlock *UnwindDest, unsigned NumReserved);
|
||||||
void growOperands(unsigned Size);
|
void growOperands(unsigned Size);
|
||||||
@ -4268,6 +4264,8 @@ protected:
|
|||||||
CatchSwitchInst *cloneImpl() const;
|
CatchSwitchInst *cloneImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void operator delete(void *Ptr) { return User::operator delete(Ptr); }
|
||||||
|
|
||||||
static CatchSwitchInst *Create(Value *ParentPad, BasicBlock *UnwindDest,
|
static CatchSwitchInst *Create(Value *ParentPad, BasicBlock *UnwindDest,
|
||||||
unsigned NumHandlers,
|
unsigned NumHandlers,
|
||||||
const Twine &NameStr = "",
|
const Twine &NameStr = "",
|
||||||
@ -4696,9 +4694,8 @@ public:
|
|||||||
explicit UnreachableInst(LLVMContext &C, BasicBlock *InsertAtEnd);
|
explicit UnreachableInst(LLVMContext &C, BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
// allocate space for exactly zero operands
|
// allocate space for exactly zero operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 0); }
|
||||||
return User::operator new(s, 0);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
unsigned getNumSuccessors() const { return 0; }
|
unsigned getNumSuccessors() const { return 0; }
|
||||||
|
|
||||||
|
@ -51,9 +51,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// allocate space for exactly one operand
|
// allocate space for exactly one operand
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 1); }
|
||||||
return User::operator new(s, 1);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
||||||
|
|
||||||
@ -79,9 +78,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// allocate space for exactly two operands
|
// allocate space for exactly two operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 2); }
|
||||||
return User::operator new(s, 2);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
/// Transparently provide more efficient getOperand methods.
|
/// Transparently provide more efficient getOperand methods.
|
||||||
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
||||||
@ -106,9 +104,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// allocate space for exactly three operands
|
// allocate space for exactly three operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 3); }
|
||||||
return User::operator new(s, 3);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
/// Transparently provide more efficient getOperand methods.
|
/// Transparently provide more efficient getOperand methods.
|
||||||
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
||||||
@ -134,9 +131,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// allocate space for exactly two operands
|
// allocate space for exactly two operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 2); }
|
||||||
return User::operator new(s, 2);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
/// Transparently provide more efficient getOperand methods.
|
/// Transparently provide more efficient getOperand methods.
|
||||||
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
||||||
@ -163,9 +159,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// allocate space for exactly three operands
|
// allocate space for exactly three operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 3); }
|
||||||
return User::operator new(s, 3);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
/// Transparently provide more efficient getOperand methods.
|
/// Transparently provide more efficient getOperand methods.
|
||||||
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
||||||
@ -200,7 +195,8 @@ public:
|
|||||||
SmallVector<int, 4> ShuffleMask;
|
SmallVector<int, 4> ShuffleMask;
|
||||||
Constant *ShuffleMaskForBitcode;
|
Constant *ShuffleMaskForBitcode;
|
||||||
|
|
||||||
void *operator new(size_t s) { return User::operator new(s, 2); }
|
void *operator new(size_t S) { return User::operator new(S, 2); }
|
||||||
|
void operator delete(void *Ptr) { return User::operator delete(Ptr); }
|
||||||
|
|
||||||
/// Transparently provide more efficient getOperand methods.
|
/// Transparently provide more efficient getOperand methods.
|
||||||
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
||||||
@ -226,9 +222,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// allocate space for exactly one operand
|
// allocate space for exactly one operand
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 1); }
|
||||||
return User::operator new(s, 1);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
/// Indices - These identify which value to extract.
|
/// Indices - These identify which value to extract.
|
||||||
const SmallVector<unsigned, 4> Indices;
|
const SmallVector<unsigned, 4> Indices;
|
||||||
@ -258,9 +253,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// allocate space for exactly one operand
|
// allocate space for exactly one operand
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 2); }
|
||||||
return User::operator new(s, 2);
|
void operator delete(void *Ptr) { User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
/// Indices - These identify the position for the insertion.
|
/// Indices - These identify the position for the insertion.
|
||||||
const SmallVector<unsigned, 4> Indices;
|
const SmallVector<unsigned, 4> Indices;
|
||||||
@ -323,9 +317,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// allocate space for exactly two operands
|
// allocate space for exactly two operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t S) { return User::operator new(S, 2); }
|
||||||
return User::operator new(s, 2);
|
void operator delete(void *Ptr) { return User::operator delete(Ptr); }
|
||||||
}
|
|
||||||
|
|
||||||
/// Transparently provide more efficient getOperand methods.
|
/// Transparently provide more efficient getOperand methods.
|
||||||
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
||||||
|
Loading…
Reference in New Issue
Block a user