mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
[C++11] Add 'override' keyword to IR library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202939 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0bfd526b6b
commit
98f54c09d0
@ -41,8 +41,8 @@ namespace llvm {
|
|||||||
class Constant : public User {
|
class Constant : public User {
|
||||||
void operator=(const Constant &) LLVM_DELETED_FUNCTION;
|
void operator=(const Constant &) LLVM_DELETED_FUNCTION;
|
||||||
Constant(const Constant &) LLVM_DELETED_FUNCTION;
|
Constant(const Constant &) LLVM_DELETED_FUNCTION;
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Constant(Type *ty, ValueTy vty, Use *Ops, unsigned NumOps)
|
Constant(Type *ty, ValueTy vty, Use *Ops, unsigned NumOps)
|
||||||
: User(ty, vty, Ops, NumOps) {}
|
: User(ty, vty, Ops, NumOps) {}
|
||||||
|
@ -49,7 +49,7 @@ struct ConvertConstantType;
|
|||||||
/// represents both boolean and integral constants.
|
/// represents both boolean and integral constants.
|
||||||
/// @brief Class for constant integers.
|
/// @brief Class for constant integers.
|
||||||
class ConstantInt : public Constant {
|
class ConstantInt : public Constant {
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
ConstantInt(const ConstantInt &) LLVM_DELETED_FUNCTION;
|
ConstantInt(const ConstantInt &) LLVM_DELETED_FUNCTION;
|
||||||
ConstantInt(IntegerType *Ty, const APInt& V);
|
ConstantInt(IntegerType *Ty, const APInt& V);
|
||||||
@ -231,7 +231,7 @@ public:
|
|||||||
///
|
///
|
||||||
class ConstantFP : public Constant {
|
class ConstantFP : public Constant {
|
||||||
APFloat Val;
|
APFloat Val;
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
ConstantFP(const ConstantFP &) LLVM_DELETED_FUNCTION;
|
ConstantFP(const ConstantFP &) LLVM_DELETED_FUNCTION;
|
||||||
friend class LLVMContextImpl;
|
friend class LLVMContextImpl;
|
||||||
@ -308,7 +308,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
static ConstantAggregateZero *get(Type *Ty);
|
static ConstantAggregateZero *get(Type *Ty);
|
||||||
|
|
||||||
virtual void destroyConstant();
|
void destroyConstant() override;
|
||||||
|
|
||||||
/// getSequentialElement - If this CAZ has array or vector type, return a zero
|
/// getSequentialElement - If this CAZ has array or vector type, return a zero
|
||||||
/// with the right element type.
|
/// with the right element type.
|
||||||
@ -356,8 +356,8 @@ public:
|
|||||||
return cast<ArrayType>(Value::getType());
|
return cast<ArrayType>(Value::getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void destroyConstant();
|
void destroyConstant() override;
|
||||||
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U);
|
void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) override;
|
||||||
|
|
||||||
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static bool classof(const Value *V) {
|
static bool classof(const Value *V) {
|
||||||
@ -414,8 +414,8 @@ public:
|
|||||||
return cast<StructType>(Value::getType());
|
return cast<StructType>(Value::getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void destroyConstant();
|
void destroyConstant() override;
|
||||||
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U);
|
void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) override;
|
||||||
|
|
||||||
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static bool classof(const Value *V) {
|
static bool classof(const Value *V) {
|
||||||
@ -461,8 +461,8 @@ public:
|
|||||||
/// elements have the same value, return that value. Otherwise return NULL.
|
/// elements have the same value, return that value. Otherwise return NULL.
|
||||||
Constant *getSplatValue() const;
|
Constant *getSplatValue() const;
|
||||||
|
|
||||||
virtual void destroyConstant();
|
void destroyConstant() override;
|
||||||
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U);
|
void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) override;
|
||||||
|
|
||||||
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static bool classof(const Value *V) {
|
static bool classof(const Value *V) {
|
||||||
@ -497,7 +497,7 @@ public:
|
|||||||
/// get() - Static factory methods - Return objects of the specified value
|
/// get() - Static factory methods - Return objects of the specified value
|
||||||
static ConstantPointerNull *get(PointerType *T);
|
static ConstantPointerNull *get(PointerType *T);
|
||||||
|
|
||||||
virtual void destroyConstant();
|
void destroyConstant() override;
|
||||||
|
|
||||||
/// getType - Specialize the getType() method to always return an PointerType,
|
/// getType - Specialize the getType() method to always return an PointerType,
|
||||||
/// which reduces the amount of casting needed in parts of the compiler.
|
/// which reduces the amount of casting needed in parts of the compiler.
|
||||||
@ -624,7 +624,7 @@ public:
|
|||||||
/// host endianness of the data elements.
|
/// host endianness of the data elements.
|
||||||
StringRef getRawDataValues() const;
|
StringRef getRawDataValues() const;
|
||||||
|
|
||||||
virtual void destroyConstant();
|
void destroyConstant() override;
|
||||||
|
|
||||||
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
///
|
///
|
||||||
@ -645,7 +645,7 @@ private:
|
|||||||
class ConstantDataArray : public ConstantDataSequential {
|
class ConstantDataArray : public ConstantDataSequential {
|
||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
ConstantDataArray(const ConstantDataArray &) LLVM_DELETED_FUNCTION;
|
ConstantDataArray(const ConstantDataArray &) LLVM_DELETED_FUNCTION;
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
friend class ConstantDataSequential;
|
friend class ConstantDataSequential;
|
||||||
explicit ConstantDataArray(Type *ty, const char *Data)
|
explicit ConstantDataArray(Type *ty, const char *Data)
|
||||||
: ConstantDataSequential(ty, ConstantDataArrayVal, Data) {}
|
: ConstantDataSequential(ty, ConstantDataArrayVal, Data) {}
|
||||||
@ -697,7 +697,7 @@ public:
|
|||||||
class ConstantDataVector : public ConstantDataSequential {
|
class ConstantDataVector : public ConstantDataSequential {
|
||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
ConstantDataVector(const ConstantDataVector &) LLVM_DELETED_FUNCTION;
|
ConstantDataVector(const ConstantDataVector &) LLVM_DELETED_FUNCTION;
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
friend class ConstantDataSequential;
|
friend class ConstantDataSequential;
|
||||||
explicit ConstantDataVector(Type *ty, const char *Data)
|
explicit ConstantDataVector(Type *ty, const char *Data)
|
||||||
: ConstantDataSequential(ty, ConstantDataVectorVal, Data) {}
|
: ConstantDataSequential(ty, ConstantDataVectorVal, Data) {}
|
||||||
@ -769,8 +769,8 @@ public:
|
|||||||
Function *getFunction() const { return (Function*)Op<0>().get(); }
|
Function *getFunction() const { return (Function*)Op<0>().get(); }
|
||||||
BasicBlock *getBasicBlock() const { return (BasicBlock*)Op<1>().get(); }
|
BasicBlock *getBasicBlock() const { return (BasicBlock*)Op<1>().get(); }
|
||||||
|
|
||||||
virtual void destroyConstant();
|
void destroyConstant() override;
|
||||||
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U);
|
void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) override;
|
||||||
|
|
||||||
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
@ -1099,8 +1099,8 @@ public:
|
|||||||
/// would make it harder to remove ConstantExprs altogether.
|
/// would make it harder to remove ConstantExprs altogether.
|
||||||
Instruction *getAsInstruction();
|
Instruction *getAsInstruction();
|
||||||
|
|
||||||
virtual void destroyConstant();
|
void destroyConstant() override;
|
||||||
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U);
|
void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) override;
|
||||||
|
|
||||||
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
@ -1164,7 +1164,7 @@ public:
|
|||||||
/// index.
|
/// index.
|
||||||
UndefValue *getElementValue(unsigned Idx) const;
|
UndefValue *getElementValue(unsigned Idx) const;
|
||||||
|
|
||||||
virtual void destroyConstant();
|
void destroyConstant() override;
|
||||||
|
|
||||||
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static bool classof(const Value *V) {
|
static bool classof(const Value *V) {
|
||||||
|
@ -128,7 +128,7 @@ public:
|
|||||||
const Instruction *getInstruction() const { return Instr; }
|
const Instruction *getInstruction() const { return Instr; }
|
||||||
|
|
||||||
/// \see DiagnosticInfo::print.
|
/// \see DiagnosticInfo::print.
|
||||||
virtual void print(DiagnosticPrinter &DP) const;
|
void print(DiagnosticPrinter &DP) const override;
|
||||||
|
|
||||||
/// Hand rolled RTTI.
|
/// Hand rolled RTTI.
|
||||||
static bool classof(const DiagnosticInfo *DI) {
|
static bool classof(const DiagnosticInfo *DI) {
|
||||||
@ -156,7 +156,7 @@ public:
|
|||||||
unsigned getStackSize() const { return StackSize; }
|
unsigned getStackSize() const { return StackSize; }
|
||||||
|
|
||||||
/// \see DiagnosticInfo::print.
|
/// \see DiagnosticInfo::print.
|
||||||
virtual void print(DiagnosticPrinter &DP) const;
|
void print(DiagnosticPrinter &DP) const override;
|
||||||
|
|
||||||
/// Hand rolled RTTI.
|
/// Hand rolled RTTI.
|
||||||
static bool classof(const DiagnosticInfo *DI) {
|
static bool classof(const DiagnosticInfo *DI) {
|
||||||
@ -185,7 +185,7 @@ public:
|
|||||||
unsigned getMetadataVersion() const { return MetadataVersion; }
|
unsigned getMetadataVersion() const { return MetadataVersion; }
|
||||||
|
|
||||||
/// \see DiagnosticInfo::print.
|
/// \see DiagnosticInfo::print.
|
||||||
virtual void print(DiagnosticPrinter &DP) const;
|
void print(DiagnosticPrinter &DP) const override;
|
||||||
|
|
||||||
/// Hand rolled RTTI.
|
/// Hand rolled RTTI.
|
||||||
static bool classof(const DiagnosticInfo *DI) {
|
static bool classof(const DiagnosticInfo *DI) {
|
||||||
|
@ -62,25 +62,25 @@ public:
|
|||||||
DiagnosticPrinterRawOStream(raw_ostream &Stream) : Stream(Stream) {};
|
DiagnosticPrinterRawOStream(raw_ostream &Stream) : Stream(Stream) {};
|
||||||
|
|
||||||
// Simple types.
|
// Simple types.
|
||||||
virtual DiagnosticPrinter &operator<<(char C);
|
DiagnosticPrinter &operator<<(char C) override;
|
||||||
virtual DiagnosticPrinter &operator<<(unsigned char C);
|
DiagnosticPrinter &operator<<(unsigned char C) override;
|
||||||
virtual DiagnosticPrinter &operator<<(signed char C);
|
DiagnosticPrinter &operator<<(signed char C) override;
|
||||||
virtual DiagnosticPrinter &operator<<(StringRef Str);
|
DiagnosticPrinter &operator<<(StringRef Str) override;
|
||||||
virtual DiagnosticPrinter &operator<<(const char *Str);
|
DiagnosticPrinter &operator<<(const char *Str) override;
|
||||||
virtual DiagnosticPrinter &operator<<(const std::string &Str);
|
DiagnosticPrinter &operator<<(const std::string &Str) override;
|
||||||
virtual DiagnosticPrinter &operator<<(unsigned long N);
|
DiagnosticPrinter &operator<<(unsigned long N) override;
|
||||||
virtual DiagnosticPrinter &operator<<(long N);
|
DiagnosticPrinter &operator<<(long N) override;
|
||||||
virtual DiagnosticPrinter &operator<<(unsigned long long N);
|
DiagnosticPrinter &operator<<(unsigned long long N) override;
|
||||||
virtual DiagnosticPrinter &operator<<(long long N);
|
DiagnosticPrinter &operator<<(long long N) override;
|
||||||
virtual DiagnosticPrinter &operator<<(const void *P);
|
DiagnosticPrinter &operator<<(const void *P) override;
|
||||||
virtual DiagnosticPrinter &operator<<(unsigned int N);
|
DiagnosticPrinter &operator<<(unsigned int N) override;
|
||||||
virtual DiagnosticPrinter &operator<<(int N);
|
DiagnosticPrinter &operator<<(int N) override;
|
||||||
virtual DiagnosticPrinter &operator<<(double N);
|
DiagnosticPrinter &operator<<(double N) override;
|
||||||
virtual DiagnosticPrinter &operator<<(const Twine &Str);
|
DiagnosticPrinter &operator<<(const Twine &Str) override;
|
||||||
|
|
||||||
// IR related types.
|
// IR related types.
|
||||||
virtual DiagnosticPrinter &operator<<(const Value &V);
|
DiagnosticPrinter &operator<<(const Value &V) override;
|
||||||
virtual DiagnosticPrinter &operator<<(const Module &M);
|
DiagnosticPrinter &operator<<(const Module &M) override;
|
||||||
};
|
};
|
||||||
} // End namespace llvm
|
} // End namespace llvm
|
||||||
|
|
||||||
|
@ -176,17 +176,17 @@ public:
|
|||||||
DominatorTree &getDomTree() { return DT; }
|
DominatorTree &getDomTree() { return DT; }
|
||||||
const DominatorTree &getDomTree() const { return DT; }
|
const DominatorTree &getDomTree() const { return DT; }
|
||||||
|
|
||||||
virtual bool runOnFunction(Function &F);
|
bool runOnFunction(Function &F) override;
|
||||||
|
|
||||||
virtual void verifyAnalysis() const;
|
void verifyAnalysis() const override;
|
||||||
|
|
||||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||||
AU.setPreservesAll();
|
AU.setPreservesAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void releaseMemory() { DT.releaseMemory(); }
|
void releaseMemory() override { DT.releaseMemory(); }
|
||||||
|
|
||||||
virtual void print(raw_ostream &OS, const Module *M = 0) const;
|
void print(raw_ostream &OS, const Module *M = 0) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
@ -335,7 +335,7 @@ public:
|
|||||||
|
|
||||||
/// copyAttributesFrom - copy all additional attributes (those not needed to
|
/// copyAttributesFrom - copy all additional attributes (those not needed to
|
||||||
/// create a Function) from the Function Src to this one.
|
/// create a Function) from the Function Src to this one.
|
||||||
void copyAttributesFrom(const GlobalValue *Src);
|
void copyAttributesFrom(const GlobalValue *Src) override;
|
||||||
|
|
||||||
/// deleteBody - This method deletes the body of the function, and converts
|
/// deleteBody - This method deletes the body of the function, and converts
|
||||||
/// the linkage to external.
|
/// the linkage to external.
|
||||||
@ -348,12 +348,12 @@ public:
|
|||||||
/// removeFromParent - This method unlinks 'this' from the containing module,
|
/// removeFromParent - This method unlinks 'this' from the containing module,
|
||||||
/// but does not delete it.
|
/// but does not delete it.
|
||||||
///
|
///
|
||||||
virtual void removeFromParent();
|
void removeFromParent() override;
|
||||||
|
|
||||||
/// eraseFromParent - This method unlinks 'this' from the containing module
|
/// eraseFromParent - This method unlinks 'this' from the containing module
|
||||||
/// and deletes it.
|
/// and deletes it.
|
||||||
///
|
///
|
||||||
virtual void eraseFromParent();
|
void eraseFromParent() override;
|
||||||
|
|
||||||
|
|
||||||
/// Get the underlying elements of the Function... the basic block list is
|
/// Get the underlying elements of the Function... the basic block list is
|
||||||
|
@ -49,12 +49,12 @@ public:
|
|||||||
/// removeFromParent - This method unlinks 'this' from the containing module,
|
/// removeFromParent - This method unlinks 'this' from the containing module,
|
||||||
/// but does not delete it.
|
/// but does not delete it.
|
||||||
///
|
///
|
||||||
virtual void removeFromParent();
|
void removeFromParent() override;
|
||||||
|
|
||||||
/// eraseFromParent - This method unlinks 'this' from the containing module
|
/// eraseFromParent - This method unlinks 'this' from the containing module
|
||||||
/// and deletes it.
|
/// and deletes it.
|
||||||
///
|
///
|
||||||
virtual void eraseFromParent();
|
void eraseFromParent() override;
|
||||||
|
|
||||||
/// set/getAliasee - These methods retrive and set alias target.
|
/// set/getAliasee - These methods retrive and set alias target.
|
||||||
void setAliasee(Constant *GV);
|
void setAliasee(Constant *GV);
|
||||||
|
@ -281,7 +281,7 @@ public:
|
|||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
/// Override from Constant class.
|
/// Override from Constant class.
|
||||||
virtual void destroyConstant();
|
void destroyConstant() override;
|
||||||
|
|
||||||
/// isDeclaration - Return true if the primary definition of this global
|
/// isDeclaration - Return true if the primary definition of this global
|
||||||
/// value is outside of the current translation unit.
|
/// value is outside of the current translation unit.
|
||||||
|
@ -174,21 +174,21 @@ public:
|
|||||||
|
|
||||||
/// copyAttributesFrom - copy all additional attributes (those not needed to
|
/// copyAttributesFrom - copy all additional attributes (those not needed to
|
||||||
/// create a GlobalVariable) from the GlobalVariable Src to this one.
|
/// create a GlobalVariable) from the GlobalVariable Src to this one.
|
||||||
void copyAttributesFrom(const GlobalValue *Src);
|
void copyAttributesFrom(const GlobalValue *Src) override;
|
||||||
|
|
||||||
/// removeFromParent - This method unlinks 'this' from the containing module,
|
/// removeFromParent - This method unlinks 'this' from the containing module,
|
||||||
/// but does not delete it.
|
/// but does not delete it.
|
||||||
///
|
///
|
||||||
virtual void removeFromParent();
|
void removeFromParent() override;
|
||||||
|
|
||||||
/// eraseFromParent - This method unlinks 'this' from the containing module
|
/// eraseFromParent - This method unlinks 'this' from the containing module
|
||||||
/// and deletes it.
|
/// and deletes it.
|
||||||
///
|
///
|
||||||
virtual void eraseFromParent();
|
void eraseFromParent() override;
|
||||||
|
|
||||||
/// Override Constant's implementation of this method so we can
|
/// Override Constant's implementation of this method so we can
|
||||||
/// replace constant initializers.
|
/// replace constant initializers.
|
||||||
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U);
|
void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) override;
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
|
@ -57,7 +57,7 @@ enum SynchronizationScope {
|
|||||||
///
|
///
|
||||||
class AllocaInst : public UnaryInstruction {
|
class AllocaInst : public UnaryInstruction {
|
||||||
protected:
|
protected:
|
||||||
virtual AllocaInst *clone_impl() const;
|
AllocaInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
explicit AllocaInst(Type *Ty, Value *ArraySize = 0,
|
explicit AllocaInst(Type *Ty, Value *ArraySize = 0,
|
||||||
const Twine &Name = "", Instruction *InsertBefore = 0);
|
const Twine &Name = "", Instruction *InsertBefore = 0);
|
||||||
@ -150,7 +150,7 @@ private:
|
|||||||
class LoadInst : public UnaryInstruction {
|
class LoadInst : public UnaryInstruction {
|
||||||
void AssertOK();
|
void AssertOK();
|
||||||
protected:
|
protected:
|
||||||
virtual LoadInst *clone_impl() const;
|
LoadInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
LoadInst(Value *Ptr, const Twine &NameStr, Instruction *InsertBefore);
|
LoadInst(Value *Ptr, const Twine &NameStr, Instruction *InsertBefore);
|
||||||
LoadInst(Value *Ptr, const Twine &NameStr, BasicBlock *InsertAtEnd);
|
LoadInst(Value *Ptr, const Twine &NameStr, BasicBlock *InsertAtEnd);
|
||||||
@ -270,7 +270,7 @@ class StoreInst : public Instruction {
|
|||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
void AssertOK();
|
void AssertOK();
|
||||||
protected:
|
protected:
|
||||||
virtual StoreInst *clone_impl() const;
|
StoreInst *clone_impl() const override;
|
||||||
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) {
|
||||||
@ -397,7 +397,7 @@ class FenceInst : public Instruction {
|
|||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
void Init(AtomicOrdering Ordering, SynchronizationScope SynchScope);
|
void Init(AtomicOrdering Ordering, SynchronizationScope SynchScope);
|
||||||
protected:
|
protected:
|
||||||
virtual FenceInst *clone_impl() const;
|
FenceInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly zero operands
|
// allocate space for exactly zero operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t s) {
|
||||||
@ -465,7 +465,7 @@ class AtomicCmpXchgInst : public Instruction {
|
|||||||
void Init(Value *Ptr, Value *Cmp, Value *NewVal,
|
void Init(Value *Ptr, Value *Cmp, Value *NewVal,
|
||||||
AtomicOrdering Ordering, SynchronizationScope SynchScope);
|
AtomicOrdering Ordering, SynchronizationScope SynchScope);
|
||||||
protected:
|
protected:
|
||||||
virtual AtomicCmpXchgInst *clone_impl() const;
|
AtomicCmpXchgInst *clone_impl() const override;
|
||||||
public:
|
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) {
|
||||||
@ -570,7 +570,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(AtomicCmpXchgInst, Value)
|
|||||||
class AtomicRMWInst : public Instruction {
|
class AtomicRMWInst : public Instruction {
|
||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
protected:
|
protected:
|
||||||
virtual AtomicRMWInst *clone_impl() const;
|
AtomicRMWInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
/// This enumeration lists the possible modifications atomicrmw can make. In
|
/// This enumeration lists the possible modifications atomicrmw can make. In
|
||||||
/// the descriptions, 'p' is the pointer to the instruction's memory location,
|
/// the descriptions, 'p' is the pointer to the instruction's memory location,
|
||||||
@ -735,7 +735,7 @@ class GetElementPtrInst : public Instruction {
|
|||||||
unsigned Values, const Twine &NameStr,
|
unsigned Values, const Twine &NameStr,
|
||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
protected:
|
protected:
|
||||||
virtual GetElementPtrInst *clone_impl() const;
|
GetElementPtrInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
static GetElementPtrInst *Create(Value *Ptr, ArrayRef<Value *> IdxList,
|
static GetElementPtrInst *Create(Value *Ptr, ArrayRef<Value *> IdxList,
|
||||||
const Twine &NameStr = "",
|
const Twine &NameStr = "",
|
||||||
@ -937,7 +937,7 @@ class ICmpInst: public CmpInst {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// \brief Clone an identical ICmpInst
|
/// \brief Clone an identical ICmpInst
|
||||||
virtual ICmpInst *clone_impl() const;
|
ICmpInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
/// \brief Constructor with insert-before-instruction semantics.
|
/// \brief Constructor with insert-before-instruction semantics.
|
||||||
ICmpInst(
|
ICmpInst(
|
||||||
@ -1069,7 +1069,7 @@ public:
|
|||||||
class FCmpInst: public CmpInst {
|
class FCmpInst: public CmpInst {
|
||||||
protected:
|
protected:
|
||||||
/// \brief Clone an identical FCmpInst
|
/// \brief Clone an identical FCmpInst
|
||||||
virtual FCmpInst *clone_impl() const;
|
FCmpInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
/// \brief Constructor with insert-before-instruction semantics.
|
/// \brief Constructor with insert-before-instruction semantics.
|
||||||
FCmpInst(
|
FCmpInst(
|
||||||
@ -1192,7 +1192,7 @@ class CallInst : public Instruction {
|
|||||||
Instruction *InsertBefore);
|
Instruction *InsertBefore);
|
||||||
CallInst(Value *F, const Twine &NameStr, BasicBlock *InsertAtEnd);
|
CallInst(Value *F, const Twine &NameStr, BasicBlock *InsertAtEnd);
|
||||||
protected:
|
protected:
|
||||||
virtual CallInst *clone_impl() const;
|
CallInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
static CallInst *Create(Value *Func,
|
static CallInst *Create(Value *Func,
|
||||||
ArrayRef<Value *> Args,
|
ArrayRef<Value *> Args,
|
||||||
@ -1464,7 +1464,7 @@ class SelectInst : public Instruction {
|
|||||||
setName(NameStr);
|
setName(NameStr);
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
virtual SelectInst *clone_impl() const;
|
SelectInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
static SelectInst *Create(Value *C, Value *S1, Value *S2,
|
static SelectInst *Create(Value *C, Value *S1, Value *S2,
|
||||||
const Twine &NameStr = "",
|
const Twine &NameStr = "",
|
||||||
@ -1519,7 +1519,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(SelectInst, Value)
|
|||||||
///
|
///
|
||||||
class VAArgInst : public UnaryInstruction {
|
class VAArgInst : public UnaryInstruction {
|
||||||
protected:
|
protected:
|
||||||
virtual VAArgInst *clone_impl() const;
|
VAArgInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VAArgInst(Value *List, Type *Ty, const Twine &NameStr = "",
|
VAArgInst(Value *List, Type *Ty, const Twine &NameStr = "",
|
||||||
@ -1559,7 +1559,7 @@ class ExtractElementInst : public Instruction {
|
|||||||
ExtractElementInst(Value *Vec, Value *Idx, const Twine &NameStr,
|
ExtractElementInst(Value *Vec, Value *Idx, const Twine &NameStr,
|
||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
protected:
|
protected:
|
||||||
virtual ExtractElementInst *clone_impl() const;
|
ExtractElementInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static ExtractElementInst *Create(Value *Vec, Value *Idx,
|
static ExtractElementInst *Create(Value *Vec, Value *Idx,
|
||||||
@ -1620,7 +1620,7 @@ class InsertElementInst : public Instruction {
|
|||||||
InsertElementInst(Value *Vec, Value *NewElt, Value *Idx,
|
InsertElementInst(Value *Vec, Value *NewElt, Value *Idx,
|
||||||
const Twine &NameStr, BasicBlock *InsertAtEnd);
|
const Twine &NameStr, BasicBlock *InsertAtEnd);
|
||||||
protected:
|
protected:
|
||||||
virtual InsertElementInst *clone_impl() const;
|
InsertElementInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static InsertElementInst *Create(Value *Vec, Value *NewElt, Value *Idx,
|
static InsertElementInst *Create(Value *Vec, Value *NewElt, Value *Idx,
|
||||||
@ -1673,7 +1673,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(InsertElementInst, Value)
|
|||||||
///
|
///
|
||||||
class ShuffleVectorInst : public Instruction {
|
class ShuffleVectorInst : public Instruction {
|
||||||
protected:
|
protected:
|
||||||
virtual ShuffleVectorInst *clone_impl() const;
|
ShuffleVectorInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly three operands
|
// allocate space for exactly three operands
|
||||||
@ -1774,7 +1774,7 @@ class ExtractValueInst : public UnaryInstruction {
|
|||||||
return User::operator new(s, 1);
|
return User::operator new(s, 1);
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
virtual ExtractValueInst *clone_impl() const;
|
ExtractValueInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static ExtractValueInst *Create(Value *Agg,
|
static ExtractValueInst *Create(Value *Agg,
|
||||||
@ -1885,7 +1885,7 @@ class InsertValueInst : public Instruction {
|
|||||||
InsertValueInst(Value *Agg, Value *Val, unsigned Idx,
|
InsertValueInst(Value *Agg, Value *Val, unsigned Idx,
|
||||||
const Twine &NameStr, BasicBlock *InsertAtEnd);
|
const Twine &NameStr, BasicBlock *InsertAtEnd);
|
||||||
protected:
|
protected:
|
||||||
virtual InsertValueInst *clone_impl() const;
|
InsertValueInst *clone_impl() const override;
|
||||||
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) {
|
||||||
@ -2020,7 +2020,7 @@ protected:
|
|||||||
// values and pointers to the incoming blocks, all in one allocation.
|
// values and pointers to the incoming blocks, all in one allocation.
|
||||||
Use *allocHungoffUses(unsigned) const;
|
Use *allocHungoffUses(unsigned) const;
|
||||||
|
|
||||||
virtual PHINode *clone_impl() const;
|
PHINode *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
/// Constructors - NumReservedValues is a hint for the number of incoming
|
/// Constructors - NumReservedValues is a hint for the number of incoming
|
||||||
/// edges that this phi node will have (use 0 if you really have no idea).
|
/// edges that this phi node will have (use 0 if you really have no idea).
|
||||||
@ -2211,7 +2211,7 @@ private:
|
|||||||
unsigned NumReservedValues, const Twine &NameStr,
|
unsigned NumReservedValues, const Twine &NameStr,
|
||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
protected:
|
protected:
|
||||||
virtual LandingPadInst *clone_impl() const;
|
LandingPadInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
/// 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).
|
||||||
@ -2309,7 +2309,7 @@ private:
|
|||||||
ReturnInst(LLVMContext &C, Value *retVal, BasicBlock *InsertAtEnd);
|
ReturnInst(LLVMContext &C, Value *retVal, BasicBlock *InsertAtEnd);
|
||||||
explicit ReturnInst(LLVMContext &C, BasicBlock *InsertAtEnd);
|
explicit ReturnInst(LLVMContext &C, BasicBlock *InsertAtEnd);
|
||||||
protected:
|
protected:
|
||||||
virtual ReturnInst *clone_impl() const;
|
ReturnInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
static ReturnInst* Create(LLVMContext &C, Value *retVal = 0,
|
static ReturnInst* Create(LLVMContext &C, Value *retVal = 0,
|
||||||
Instruction *InsertBefore = 0) {
|
Instruction *InsertBefore = 0) {
|
||||||
@ -2342,9 +2342,9 @@ public:
|
|||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
virtual BasicBlock *getSuccessorV(unsigned idx) const;
|
BasicBlock *getSuccessorV(unsigned idx) const override;
|
||||||
virtual unsigned getNumSuccessorsV() const;
|
unsigned getNumSuccessorsV() const override;
|
||||||
virtual void setSuccessorV(unsigned idx, BasicBlock *B);
|
void setSuccessorV(unsigned idx, BasicBlock *B) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -2381,7 +2381,7 @@ class BranchInst : public TerminatorInst {
|
|||||||
BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
|
BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
|
||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
protected:
|
protected:
|
||||||
virtual BranchInst *clone_impl() const;
|
BranchInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
static BranchInst *Create(BasicBlock *IfTrue, Instruction *InsertBefore = 0) {
|
static BranchInst *Create(BasicBlock *IfTrue, Instruction *InsertBefore = 0) {
|
||||||
return new(1) BranchInst(IfTrue, InsertBefore);
|
return new(1) BranchInst(IfTrue, InsertBefore);
|
||||||
@ -2441,9 +2441,9 @@ public:
|
|||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
virtual BasicBlock *getSuccessorV(unsigned idx) const;
|
BasicBlock *getSuccessorV(unsigned idx) const override;
|
||||||
virtual unsigned getNumSuccessorsV() const;
|
unsigned getNumSuccessorsV() const override;
|
||||||
virtual void setSuccessorV(unsigned idx, BasicBlock *B);
|
void setSuccessorV(unsigned idx, BasicBlock *B) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -2487,7 +2487,7 @@ class SwitchInst : public TerminatorInst {
|
|||||||
SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases,
|
SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases,
|
||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
protected:
|
protected:
|
||||||
virtual SwitchInst *clone_impl() const;
|
SwitchInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// -2
|
// -2
|
||||||
@ -2734,9 +2734,9 @@ public:
|
|||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
virtual BasicBlock *getSuccessorV(unsigned idx) const;
|
BasicBlock *getSuccessorV(unsigned idx) const override;
|
||||||
virtual unsigned getNumSuccessorsV() const;
|
unsigned getNumSuccessorsV() const override;
|
||||||
virtual void setSuccessorV(unsigned idx, BasicBlock *B);
|
void setSuccessorV(unsigned idx, BasicBlock *B) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -2779,7 +2779,7 @@ class IndirectBrInst : public TerminatorInst {
|
|||||||
/// autoinserts at the end of the specified BasicBlock.
|
/// autoinserts at the end of the specified BasicBlock.
|
||||||
IndirectBrInst(Value *Address, unsigned NumDests, BasicBlock *InsertAtEnd);
|
IndirectBrInst(Value *Address, unsigned NumDests, BasicBlock *InsertAtEnd);
|
||||||
protected:
|
protected:
|
||||||
virtual IndirectBrInst *clone_impl() const;
|
IndirectBrInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
static IndirectBrInst *Create(Value *Address, unsigned NumDests,
|
static IndirectBrInst *Create(Value *Address, unsigned NumDests,
|
||||||
Instruction *InsertBefore = 0) {
|
Instruction *InsertBefore = 0) {
|
||||||
@ -2832,9 +2832,9 @@ public:
|
|||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
virtual BasicBlock *getSuccessorV(unsigned idx) const;
|
BasicBlock *getSuccessorV(unsigned idx) const override;
|
||||||
virtual unsigned getNumSuccessorsV() const;
|
unsigned getNumSuccessorsV() const override;
|
||||||
virtual void setSuccessorV(unsigned idx, BasicBlock *B);
|
void setSuccessorV(unsigned idx, BasicBlock *B) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -2871,7 +2871,7 @@ class InvokeInst : public TerminatorInst {
|
|||||||
ArrayRef<Value *> Args, unsigned Values,
|
ArrayRef<Value *> Args, unsigned Values,
|
||||||
const Twine &NameStr, BasicBlock *InsertAtEnd);
|
const Twine &NameStr, BasicBlock *InsertAtEnd);
|
||||||
protected:
|
protected:
|
||||||
virtual InvokeInst *clone_impl() const;
|
InvokeInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
static InvokeInst *Create(Value *Func,
|
static InvokeInst *Create(Value *Func,
|
||||||
BasicBlock *IfNormal, BasicBlock *IfException,
|
BasicBlock *IfNormal, BasicBlock *IfException,
|
||||||
@ -3055,9 +3055,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual BasicBlock *getSuccessorV(unsigned idx) const;
|
BasicBlock *getSuccessorV(unsigned idx) const override;
|
||||||
virtual unsigned getNumSuccessorsV() const;
|
unsigned getNumSuccessorsV() const override;
|
||||||
virtual void setSuccessorV(unsigned idx, BasicBlock *B);
|
void setSuccessorV(unsigned idx, BasicBlock *B) override;
|
||||||
|
|
||||||
bool hasFnAttrImpl(Attribute::AttrKind A) const;
|
bool hasFnAttrImpl(Attribute::AttrKind A) const;
|
||||||
|
|
||||||
@ -3110,7 +3110,7 @@ class ResumeInst : public TerminatorInst {
|
|||||||
explicit ResumeInst(Value *Exn, Instruction *InsertBefore=0);
|
explicit ResumeInst(Value *Exn, Instruction *InsertBefore=0);
|
||||||
ResumeInst(Value *Exn, BasicBlock *InsertAtEnd);
|
ResumeInst(Value *Exn, BasicBlock *InsertAtEnd);
|
||||||
protected:
|
protected:
|
||||||
virtual ResumeInst *clone_impl() const;
|
ResumeInst *clone_impl() const override;
|
||||||
public:
|
public:
|
||||||
static ResumeInst *Create(Value *Exn, Instruction *InsertBefore = 0) {
|
static ResumeInst *Create(Value *Exn, Instruction *InsertBefore = 0) {
|
||||||
return new(1) ResumeInst(Exn, InsertBefore);
|
return new(1) ResumeInst(Exn, InsertBefore);
|
||||||
@ -3135,9 +3135,9 @@ public:
|
|||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
virtual BasicBlock *getSuccessorV(unsigned idx) const;
|
BasicBlock *getSuccessorV(unsigned idx) const override;
|
||||||
virtual unsigned getNumSuccessorsV() const;
|
unsigned getNumSuccessorsV() const override;
|
||||||
virtual void setSuccessorV(unsigned idx, BasicBlock *B);
|
void setSuccessorV(unsigned idx, BasicBlock *B) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -3159,7 +3159,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ResumeInst, Value)
|
|||||||
class UnreachableInst : public TerminatorInst {
|
class UnreachableInst : public TerminatorInst {
|
||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
protected:
|
protected:
|
||||||
virtual UnreachableInst *clone_impl() const;
|
UnreachableInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly zero operands
|
// allocate space for exactly zero operands
|
||||||
@ -3179,9 +3179,9 @@ public:
|
|||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
virtual BasicBlock *getSuccessorV(unsigned idx) const;
|
BasicBlock *getSuccessorV(unsigned idx) const override;
|
||||||
virtual unsigned getNumSuccessorsV() const;
|
unsigned getNumSuccessorsV() const override;
|
||||||
virtual void setSuccessorV(unsigned idx, BasicBlock *B);
|
void setSuccessorV(unsigned idx, BasicBlock *B) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@ -3192,7 +3192,7 @@ private:
|
|||||||
class TruncInst : public CastInst {
|
class TruncInst : public CastInst {
|
||||||
protected:
|
protected:
|
||||||
/// \brief Clone an identical TruncInst
|
/// \brief Clone an identical TruncInst
|
||||||
virtual TruncInst *clone_impl() const;
|
TruncInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// \brief Constructor with insert-before-instruction semantics
|
/// \brief Constructor with insert-before-instruction semantics
|
||||||
@ -3228,7 +3228,7 @@ public:
|
|||||||
class ZExtInst : public CastInst {
|
class ZExtInst : public CastInst {
|
||||||
protected:
|
protected:
|
||||||
/// \brief Clone an identical ZExtInst
|
/// \brief Clone an identical ZExtInst
|
||||||
virtual ZExtInst *clone_impl() const;
|
ZExtInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// \brief Constructor with insert-before-instruction semantics
|
/// \brief Constructor with insert-before-instruction semantics
|
||||||
@ -3264,7 +3264,7 @@ public:
|
|||||||
class SExtInst : public CastInst {
|
class SExtInst : public CastInst {
|
||||||
protected:
|
protected:
|
||||||
/// \brief Clone an identical SExtInst
|
/// \brief Clone an identical SExtInst
|
||||||
virtual SExtInst *clone_impl() const;
|
SExtInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// \brief Constructor with insert-before-instruction semantics
|
/// \brief Constructor with insert-before-instruction semantics
|
||||||
@ -3300,7 +3300,7 @@ public:
|
|||||||
class FPTruncInst : public CastInst {
|
class FPTruncInst : public CastInst {
|
||||||
protected:
|
protected:
|
||||||
/// \brief Clone an identical FPTruncInst
|
/// \brief Clone an identical FPTruncInst
|
||||||
virtual FPTruncInst *clone_impl() const;
|
FPTruncInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// \brief Constructor with insert-before-instruction semantics
|
/// \brief Constructor with insert-before-instruction semantics
|
||||||
@ -3336,7 +3336,7 @@ public:
|
|||||||
class FPExtInst : public CastInst {
|
class FPExtInst : public CastInst {
|
||||||
protected:
|
protected:
|
||||||
/// \brief Clone an identical FPExtInst
|
/// \brief Clone an identical FPExtInst
|
||||||
virtual FPExtInst *clone_impl() const;
|
FPExtInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// \brief Constructor with insert-before-instruction semantics
|
/// \brief Constructor with insert-before-instruction semantics
|
||||||
@ -3372,7 +3372,7 @@ public:
|
|||||||
class UIToFPInst : public CastInst {
|
class UIToFPInst : public CastInst {
|
||||||
protected:
|
protected:
|
||||||
/// \brief Clone an identical UIToFPInst
|
/// \brief Clone an identical UIToFPInst
|
||||||
virtual UIToFPInst *clone_impl() const;
|
UIToFPInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// \brief Constructor with insert-before-instruction semantics
|
/// \brief Constructor with insert-before-instruction semantics
|
||||||
@ -3408,7 +3408,7 @@ public:
|
|||||||
class SIToFPInst : public CastInst {
|
class SIToFPInst : public CastInst {
|
||||||
protected:
|
protected:
|
||||||
/// \brief Clone an identical SIToFPInst
|
/// \brief Clone an identical SIToFPInst
|
||||||
virtual SIToFPInst *clone_impl() const;
|
SIToFPInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// \brief Constructor with insert-before-instruction semantics
|
/// \brief Constructor with insert-before-instruction semantics
|
||||||
@ -3444,7 +3444,7 @@ public:
|
|||||||
class FPToUIInst : public CastInst {
|
class FPToUIInst : public CastInst {
|
||||||
protected:
|
protected:
|
||||||
/// \brief Clone an identical FPToUIInst
|
/// \brief Clone an identical FPToUIInst
|
||||||
virtual FPToUIInst *clone_impl() const;
|
FPToUIInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// \brief Constructor with insert-before-instruction semantics
|
/// \brief Constructor with insert-before-instruction semantics
|
||||||
@ -3480,7 +3480,7 @@ public:
|
|||||||
class FPToSIInst : public CastInst {
|
class FPToSIInst : public CastInst {
|
||||||
protected:
|
protected:
|
||||||
/// \brief Clone an identical FPToSIInst
|
/// \brief Clone an identical FPToSIInst
|
||||||
virtual FPToSIInst *clone_impl() const;
|
FPToSIInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// \brief Constructor with insert-before-instruction semantics
|
/// \brief Constructor with insert-before-instruction semantics
|
||||||
@ -3532,7 +3532,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// \brief Clone an identical IntToPtrInst
|
/// \brief Clone an identical IntToPtrInst
|
||||||
virtual IntToPtrInst *clone_impl() const;
|
IntToPtrInst *clone_impl() const override;
|
||||||
|
|
||||||
/// \brief Returns the address space of this instruction's pointer type.
|
/// \brief Returns the address space of this instruction's pointer type.
|
||||||
unsigned getAddressSpace() const {
|
unsigned getAddressSpace() const {
|
||||||
@ -3556,7 +3556,7 @@ public:
|
|||||||
class PtrToIntInst : public CastInst {
|
class PtrToIntInst : public CastInst {
|
||||||
protected:
|
protected:
|
||||||
/// \brief Clone an identical PtrToIntInst
|
/// \brief Clone an identical PtrToIntInst
|
||||||
virtual PtrToIntInst *clone_impl() const;
|
PtrToIntInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// \brief Constructor with insert-before-instruction semantics
|
/// \brief Constructor with insert-before-instruction semantics
|
||||||
@ -3604,7 +3604,7 @@ public:
|
|||||||
class BitCastInst : public CastInst {
|
class BitCastInst : public CastInst {
|
||||||
protected:
|
protected:
|
||||||
/// \brief Clone an identical BitCastInst
|
/// \brief Clone an identical BitCastInst
|
||||||
virtual BitCastInst *clone_impl() const;
|
BitCastInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// \brief Constructor with insert-before-instruction semantics
|
/// \brief Constructor with insert-before-instruction semantics
|
||||||
@ -3641,7 +3641,7 @@ public:
|
|||||||
class AddrSpaceCastInst : public CastInst {
|
class AddrSpaceCastInst : public CastInst {
|
||||||
protected:
|
protected:
|
||||||
/// \brief Clone an identical AddrSpaceCastInst
|
/// \brief Clone an identical AddrSpaceCastInst
|
||||||
virtual AddrSpaceCastInst *clone_impl() const;
|
AddrSpaceCastInst *clone_impl() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// \brief Constructor with insert-before-instruction semantics
|
/// \brief Constructor with insert-before-instruction semantics
|
||||||
|
@ -55,7 +55,7 @@ public:
|
|||||||
/// the Pass to the PassManager. When the PassManager is destroyed, the pass
|
/// the Pass to the PassManager. When the PassManager is destroyed, the pass
|
||||||
/// will be destroyed as well, so there is no need to delete the pass. This
|
/// will be destroyed as well, so there is no need to delete the pass. This
|
||||||
/// implies that all passes MUST be allocated with 'new'.
|
/// implies that all passes MUST be allocated with 'new'.
|
||||||
void add(Pass *P);
|
void add(Pass *P) override;
|
||||||
|
|
||||||
/// run - Execute all of the passes scheduled for execution. Keep track of
|
/// run - Execute all of the passes scheduled for execution. Keep track of
|
||||||
/// whether any of the passes modifies the module, and if so, return true.
|
/// whether any of the passes modifies the module, and if so, return true.
|
||||||
@ -80,7 +80,7 @@ public:
|
|||||||
/// PassManager_X is destroyed, the pass will be destroyed as well, so
|
/// PassManager_X is destroyed, the pass will be destroyed as well, so
|
||||||
/// there is no need to delete the pass.
|
/// there is no need to delete the pass.
|
||||||
/// This implies that all passes MUST be allocated with 'new'.
|
/// This implies that all passes MUST be allocated with 'new'.
|
||||||
void add(Pass *P);
|
void add(Pass *P) override;
|
||||||
|
|
||||||
/// run - Execute all of the passes scheduled for execution. Keep
|
/// run - Execute all of the passes scheduled for execution. Keep
|
||||||
/// track of whether any of the passes modifies the function, and if
|
/// track of whether any of the passes modifies the function, and if
|
||||||
|
@ -127,7 +127,7 @@ public:
|
|||||||
: P(p), V(0), M(&m) {} // When P is run on M
|
: P(p), V(0), M(&m) {} // When P is run on M
|
||||||
|
|
||||||
/// print - Emit information about this stack frame to OS.
|
/// print - Emit information about this stack frame to OS.
|
||||||
virtual void print(raw_ostream &OS) const;
|
void print(raw_ostream &OS) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -414,7 +414,7 @@ public:
|
|||||||
/// run - Execute all of the passes scheduled for execution. Keep track of
|
/// run - Execute all of the passes scheduled for execution. Keep track of
|
||||||
/// whether any of the passes modifies the module, and if so, return true.
|
/// whether any of the passes modifies the module, and if so, return true.
|
||||||
bool runOnFunction(Function &F);
|
bool runOnFunction(Function &F);
|
||||||
bool runOnModule(Module &M);
|
bool runOnModule(Module &M) override;
|
||||||
|
|
||||||
/// cleanup - After running all passes, clean up pass manager cache.
|
/// cleanup - After running all passes, clean up pass manager cache.
|
||||||
void cleanup();
|
void cleanup();
|
||||||
@ -426,7 +426,7 @@ public:
|
|||||||
|
|
||||||
/// doInitialization - Run all of the initializers for the function passes.
|
/// doInitialization - Run all of the initializers for the function passes.
|
||||||
///
|
///
|
||||||
bool doInitialization(Module &M);
|
bool doInitialization(Module &M) override;
|
||||||
|
|
||||||
/// doFinalization - Overrides ModulePass doFinalization for global
|
/// doFinalization - Overrides ModulePass doFinalization for global
|
||||||
/// finalization tasks
|
/// finalization tasks
|
||||||
@ -435,20 +435,20 @@ public:
|
|||||||
|
|
||||||
/// doFinalization - Run all of the finalizers for the function passes.
|
/// doFinalization - Run all of the finalizers for the function passes.
|
||||||
///
|
///
|
||||||
bool doFinalization(Module &M);
|
bool doFinalization(Module &M) override;
|
||||||
|
|
||||||
virtual PMDataManager *getAsPMDataManager() { return this; }
|
PMDataManager *getAsPMDataManager() override { return this; }
|
||||||
virtual Pass *getAsPass() { return this; }
|
Pass *getAsPass() override { return this; }
|
||||||
|
|
||||||
/// Pass Manager itself does not invalidate any analysis info.
|
/// Pass Manager itself does not invalidate any analysis info.
|
||||||
void getAnalysisUsage(AnalysisUsage &Info) const {
|
void getAnalysisUsage(AnalysisUsage &Info) const override{
|
||||||
Info.setPreservesAll();
|
Info.setPreservesAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print passes managed by this manager
|
// Print passes managed by this manager
|
||||||
void dumpPassStructure(unsigned Offset);
|
void dumpPassStructure(unsigned Offset) override;
|
||||||
|
|
||||||
virtual const char *getPassName() const {
|
const char *getPassName() const override {
|
||||||
return "Function Pass Manager";
|
return "Function Pass Manager";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -458,7 +458,7 @@ public:
|
|||||||
return FP;
|
return FP;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual PassManagerType getPassManagerType() const {
|
PassManagerType getPassManagerType() const override {
|
||||||
return PMT_FunctionPassManager;
|
return PMT_FunctionPassManager;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -68,7 +68,7 @@ public:
|
|||||||
|
|
||||||
// Implement the PassRegistrationListener callbacks used to populate our map
|
// Implement the PassRegistrationListener callbacks used to populate our map
|
||||||
//
|
//
|
||||||
virtual void passRegistered(const PassInfo *P) {
|
void passRegistered(const PassInfo *P) override {
|
||||||
if (ignorablePass(P) || !Opt) return;
|
if (ignorablePass(P) || !Opt) return;
|
||||||
if (findOption(P->getPassArgument()) != getNumOptions()) {
|
if (findOption(P->getPassArgument()) != getNumOptions()) {
|
||||||
errs() << "Two passes with the same argument (-"
|
errs() << "Two passes with the same argument (-"
|
||||||
@ -77,11 +77,11 @@ public:
|
|||||||
}
|
}
|
||||||
addLiteralOption(P->getPassArgument(), P, P->getPassName());
|
addLiteralOption(P->getPassArgument(), P, P->getPassName());
|
||||||
}
|
}
|
||||||
virtual void passEnumerate(const PassInfo *P) { passRegistered(P); }
|
void passEnumerate(const PassInfo *P) override { passRegistered(P); }
|
||||||
|
|
||||||
// printOptionInfo - Print out information about this option. Override the
|
// printOptionInfo - Print out information about this option. Override the
|
||||||
// default implementation to sort the table before we print...
|
// default implementation to sort the table before we print...
|
||||||
virtual void printOptionInfo(const cl::Option &O, size_t GlobalWidth) const {
|
void printOptionInfo(const cl::Option &O, size_t GlobalWidth) const override {
|
||||||
PassNameParser *PNP = const_cast<PassNameParser*>(this);
|
PassNameParser *PNP = const_cast<PassNameParser*>(this);
|
||||||
array_pod_sort(PNP->Values.begin(), PNP->Values.end(), ValLessThan);
|
array_pod_sort(PNP->Values.begin(), PNP->Values.end(), ValLessThan);
|
||||||
cl::parser<const PassInfo*>::printOptionInfo(O, GlobalWidth);
|
cl::parser<const PassInfo*>::printOptionInfo(O, GlobalWidth);
|
||||||
@ -107,7 +107,9 @@ private:
|
|||||||
Filter filter;
|
Filter filter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool ignorablePassImpl(const PassInfo *P) const { return !filter(*P); }
|
bool ignorablePassImpl(const PassInfo *P) const override {
|
||||||
|
return !filter(*P);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
///===----------------------------------------------------------------------===//
|
///===----------------------------------------------------------------------===//
|
||||||
|
@ -235,17 +235,17 @@ public:
|
|||||||
class ModulePass : public Pass {
|
class ModulePass : public Pass {
|
||||||
public:
|
public:
|
||||||
/// createPrinterPass - Get a module printer pass.
|
/// createPrinterPass - Get a module printer pass.
|
||||||
Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const;
|
Pass *createPrinterPass(raw_ostream &O,
|
||||||
|
const std::string &Banner) const override;
|
||||||
|
|
||||||
/// runOnModule - Virtual method overriden by subclasses to process the module
|
/// runOnModule - Virtual method overriden by subclasses to process the module
|
||||||
/// being operated on.
|
/// being operated on.
|
||||||
virtual bool runOnModule(Module &M) = 0;
|
virtual bool runOnModule(Module &M) = 0;
|
||||||
|
|
||||||
virtual void assignPassManager(PMStack &PMS,
|
void assignPassManager(PMStack &PMS, PassManagerType T) override;
|
||||||
PassManagerType T);
|
|
||||||
|
|
||||||
/// Return what kind of Pass Manager can manage this pass.
|
/// Return what kind of Pass Manager can manage this pass.
|
||||||
virtual PassManagerType getPotentialPassManagerType() const;
|
PassManagerType getPotentialPassManagerType() const override;
|
||||||
|
|
||||||
explicit ModulePass(char &pid) : Pass(PT_Module, pid) {}
|
explicit ModulePass(char &pid) : Pass(PT_Module, pid) {}
|
||||||
// Force out-of-line virtual method.
|
// Force out-of-line virtual method.
|
||||||
@ -268,11 +268,11 @@ public:
|
|||||||
///
|
///
|
||||||
virtual void initializePass();
|
virtual void initializePass();
|
||||||
|
|
||||||
virtual ImmutablePass *getAsImmutablePass() { return this; }
|
ImmutablePass *getAsImmutablePass() override { return this; }
|
||||||
|
|
||||||
/// ImmutablePasses are never run.
|
/// ImmutablePasses are never run.
|
||||||
///
|
///
|
||||||
bool runOnModule(Module &) { return false; }
|
bool runOnModule(Module &) override { return false; }
|
||||||
|
|
||||||
explicit ImmutablePass(char &pid)
|
explicit ImmutablePass(char &pid)
|
||||||
: ModulePass(pid) {}
|
: ModulePass(pid) {}
|
||||||
@ -295,18 +295,18 @@ public:
|
|||||||
explicit FunctionPass(char &pid) : Pass(PT_Function, pid) {}
|
explicit FunctionPass(char &pid) : Pass(PT_Function, pid) {}
|
||||||
|
|
||||||
/// createPrinterPass - Get a function printer pass.
|
/// createPrinterPass - Get a function printer pass.
|
||||||
Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const;
|
Pass *createPrinterPass(raw_ostream &O,
|
||||||
|
const std::string &Banner) const override;
|
||||||
|
|
||||||
/// runOnFunction - Virtual method overriden by subclasses to do the
|
/// runOnFunction - Virtual method overriden by subclasses to do the
|
||||||
/// per-function processing of the pass.
|
/// per-function processing of the pass.
|
||||||
///
|
///
|
||||||
virtual bool runOnFunction(Function &F) = 0;
|
virtual bool runOnFunction(Function &F) = 0;
|
||||||
|
|
||||||
virtual void assignPassManager(PMStack &PMS,
|
void assignPassManager(PMStack &PMS, PassManagerType T) override;
|
||||||
PassManagerType T);
|
|
||||||
|
|
||||||
/// Return what kind of Pass Manager can manage this pass.
|
/// Return what kind of Pass Manager can manage this pass.
|
||||||
virtual PassManagerType getPotentialPassManagerType() const;
|
PassManagerType getPotentialPassManagerType() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// skipOptnoneFunction - This function has Attribute::OptimizeNone
|
/// skipOptnoneFunction - This function has Attribute::OptimizeNone
|
||||||
@ -331,7 +331,8 @@ public:
|
|||||||
explicit BasicBlockPass(char &pid) : Pass(PT_BasicBlock, pid) {}
|
explicit BasicBlockPass(char &pid) : Pass(PT_BasicBlock, pid) {}
|
||||||
|
|
||||||
/// createPrinterPass - Get a basic block printer pass.
|
/// createPrinterPass - Get a basic block printer pass.
|
||||||
Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const;
|
Pass *createPrinterPass(raw_ostream &O,
|
||||||
|
const std::string &Banner) const override;
|
||||||
|
|
||||||
using llvm::Pass::doInitialization;
|
using llvm::Pass::doInitialization;
|
||||||
using llvm::Pass::doFinalization;
|
using llvm::Pass::doFinalization;
|
||||||
@ -351,11 +352,10 @@ public:
|
|||||||
///
|
///
|
||||||
virtual bool doFinalization(Function &);
|
virtual bool doFinalization(Function &);
|
||||||
|
|
||||||
virtual void assignPassManager(PMStack &PMS,
|
void assignPassManager(PMStack &PMS, PassManagerType T) override;
|
||||||
PassManagerType T);
|
|
||||||
|
|
||||||
/// Return what kind of Pass Manager can manage this pass.
|
/// Return what kind of Pass Manager can manage this pass.
|
||||||
virtual PassManagerType getPotentialPassManagerType() const;
|
PassManagerType getPotentialPassManagerType() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// skipOptnoneFunction - Containing function has Attribute::OptimizeNone
|
/// skipOptnoneFunction - Containing function has Attribute::OptimizeNone
|
||||||
|
@ -109,7 +109,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
class AlignAttributeImpl : public EnumAttributeImpl {
|
class AlignAttributeImpl : public EnumAttributeImpl {
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
unsigned Align;
|
unsigned Align;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -32,7 +32,7 @@ struct ConstantTraits;
|
|||||||
/// UnaryConstantExpr - This class is private to Constants.cpp, and is used
|
/// UnaryConstantExpr - This class is private to Constants.cpp, and is used
|
||||||
/// behind the scenes to implement unary constant exprs.
|
/// behind the scenes to implement unary constant exprs.
|
||||||
class UnaryConstantExpr : public ConstantExpr {
|
class UnaryConstantExpr : public ConstantExpr {
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly one operand
|
// allocate space for exactly one operand
|
||||||
@ -49,7 +49,7 @@ public:
|
|||||||
/// BinaryConstantExpr - This class is private to Constants.cpp, and is used
|
/// BinaryConstantExpr - This class is private to Constants.cpp, and is used
|
||||||
/// behind the scenes to implement binary constant exprs.
|
/// behind the scenes to implement binary constant exprs.
|
||||||
class BinaryConstantExpr : public ConstantExpr {
|
class BinaryConstantExpr : public ConstantExpr {
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly two operands
|
// allocate space for exactly two operands
|
||||||
@ -70,7 +70,7 @@ public:
|
|||||||
/// SelectConstantExpr - This class is private to Constants.cpp, and is used
|
/// SelectConstantExpr - This class is private to Constants.cpp, and is used
|
||||||
/// behind the scenes to implement select constant exprs.
|
/// behind the scenes to implement select constant exprs.
|
||||||
class SelectConstantExpr : public ConstantExpr {
|
class SelectConstantExpr : public ConstantExpr {
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly three operands
|
// allocate space for exactly three operands
|
||||||
@ -91,7 +91,7 @@ public:
|
|||||||
/// Constants.cpp, and is used behind the scenes to implement
|
/// Constants.cpp, and is used behind the scenes to implement
|
||||||
/// extractelement constant exprs.
|
/// extractelement constant exprs.
|
||||||
class ExtractElementConstantExpr : public ConstantExpr {
|
class ExtractElementConstantExpr : public ConstantExpr {
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly two operands
|
// allocate space for exactly two operands
|
||||||
@ -112,7 +112,7 @@ public:
|
|||||||
/// Constants.cpp, and is used behind the scenes to implement
|
/// Constants.cpp, and is used behind the scenes to implement
|
||||||
/// insertelement constant exprs.
|
/// insertelement constant exprs.
|
||||||
class InsertElementConstantExpr : public ConstantExpr {
|
class InsertElementConstantExpr : public ConstantExpr {
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly three operands
|
// allocate space for exactly three operands
|
||||||
@ -134,7 +134,7 @@ public:
|
|||||||
/// Constants.cpp, and is used behind the scenes to implement
|
/// Constants.cpp, and is used behind the scenes to implement
|
||||||
/// shufflevector constant exprs.
|
/// shufflevector constant exprs.
|
||||||
class ShuffleVectorConstantExpr : public ConstantExpr {
|
class ShuffleVectorConstantExpr : public ConstantExpr {
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly three operands
|
// allocate space for exactly three operands
|
||||||
@ -159,7 +159,7 @@ public:
|
|||||||
/// Constants.cpp, and is used behind the scenes to implement
|
/// Constants.cpp, and is used behind the scenes to implement
|
||||||
/// extractvalue constant exprs.
|
/// extractvalue constant exprs.
|
||||||
class ExtractValueConstantExpr : public ConstantExpr {
|
class ExtractValueConstantExpr : public ConstantExpr {
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly one operand
|
// allocate space for exactly one operand
|
||||||
@ -185,7 +185,7 @@ public:
|
|||||||
/// Constants.cpp, and is used behind the scenes to implement
|
/// Constants.cpp, and is used behind the scenes to implement
|
||||||
/// insertvalue constant exprs.
|
/// insertvalue constant exprs.
|
||||||
class InsertValueConstantExpr : public ConstantExpr {
|
class InsertValueConstantExpr : public ConstantExpr {
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly one operand
|
// allocate space for exactly one operand
|
||||||
@ -212,7 +212,7 @@ public:
|
|||||||
/// GetElementPtrConstantExpr - This class is private to Constants.cpp, and is
|
/// GetElementPtrConstantExpr - This class is private to Constants.cpp, and is
|
||||||
/// used behind the scenes to implement getelementpr constant exprs.
|
/// used behind the scenes to implement getelementpr constant exprs.
|
||||||
class GetElementPtrConstantExpr : public ConstantExpr {
|
class GetElementPtrConstantExpr : public ConstantExpr {
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
GetElementPtrConstantExpr(Constant *C, ArrayRef<Constant*> IdxList,
|
GetElementPtrConstantExpr(Constant *C, ArrayRef<Constant*> IdxList,
|
||||||
Type *DestTy);
|
Type *DestTy);
|
||||||
public:
|
public:
|
||||||
@ -233,7 +233,7 @@ public:
|
|||||||
// behind the scenes to implement ICmp and FCmp constant expressions. This is
|
// behind the scenes to implement ICmp and FCmp constant expressions. This is
|
||||||
// needed in order to store the predicate value for these instructions.
|
// needed in order to store the predicate value for these instructions.
|
||||||
class CompareConstantExpr : public ConstantExpr {
|
class CompareConstantExpr : public ConstantExpr {
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly two operands
|
// allocate space for exactly two operands
|
||||||
|
@ -49,12 +49,12 @@ public:
|
|||||||
PrintModulePassWrapper(raw_ostream &OS, const std::string &Banner)
|
PrintModulePassWrapper(raw_ostream &OS, const std::string &Banner)
|
||||||
: ModulePass(ID), P(OS, Banner) {}
|
: ModulePass(ID), P(OS, Banner) {}
|
||||||
|
|
||||||
bool runOnModule(Module &M) {
|
bool runOnModule(Module &M) override {
|
||||||
P.run(&M);
|
P.run(&M);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||||
AU.setPreservesAll();
|
AU.setPreservesAll();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -69,12 +69,12 @@ public:
|
|||||||
: FunctionPass(ID), P(OS, Banner) {}
|
: FunctionPass(ID), P(OS, Banner) {}
|
||||||
|
|
||||||
// This pass just prints a banner followed by the function as it's processed.
|
// This pass just prints a banner followed by the function as it's processed.
|
||||||
bool runOnFunction(Function &F) {
|
bool runOnFunction(Function &F) override {
|
||||||
P.run(&F);
|
P.run(&F);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||||
AU.setPreservesAll();
|
AU.setPreservesAll();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -89,12 +89,12 @@ public:
|
|||||||
PrintBasicBlockPass(raw_ostream &Out, const std::string &Banner)
|
PrintBasicBlockPass(raw_ostream &Out, const std::string &Banner)
|
||||||
: BasicBlockPass(ID), Out(Out), Banner(Banner) {}
|
: BasicBlockPass(ID), Out(Out), Banner(Banner) {}
|
||||||
|
|
||||||
bool runOnBasicBlock(BasicBlock &BB) {
|
bool runOnBasicBlock(BasicBlock &BB) override {
|
||||||
Out << Banner << BB;
|
Out << Banner << BB;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
void getAnalysisUsage(AnalysisUsage &AU) const override{
|
||||||
AU.setPreservesAll();
|
AU.setPreservesAll();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -225,9 +225,9 @@ public:
|
|||||||
MDNode *get() const {
|
MDNode *get() const {
|
||||||
return cast_or_null<MDNode>(getValPtr());
|
return cast_or_null<MDNode>(getValPtr());
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void deleted();
|
void deleted() override;
|
||||||
virtual void allUsesReplacedWith(Value *VNew);
|
void allUsesReplacedWith(Value *VNew) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLVMContextImpl {
|
class LLVMContextImpl {
|
||||||
|
@ -164,27 +164,27 @@ public:
|
|||||||
|
|
||||||
/// Execute all of the passes scheduled for execution. Keep track of
|
/// Execute all of the passes scheduled for execution. Keep track of
|
||||||
/// whether any of the passes modifies the function, and if so, return true.
|
/// whether any of the passes modifies the function, and if so, return true.
|
||||||
bool runOnFunction(Function &F);
|
bool runOnFunction(Function &F) override;
|
||||||
|
|
||||||
/// Pass Manager itself does not invalidate any analysis info.
|
/// Pass Manager itself does not invalidate any analysis info.
|
||||||
void getAnalysisUsage(AnalysisUsage &Info) const {
|
void getAnalysisUsage(AnalysisUsage &Info) const override {
|
||||||
Info.setPreservesAll();
|
Info.setPreservesAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool doInitialization(Module &M);
|
bool doInitialization(Module &M) override;
|
||||||
bool doInitialization(Function &F);
|
bool doInitialization(Function &F);
|
||||||
bool doFinalization(Module &M);
|
bool doFinalization(Module &M) override;
|
||||||
bool doFinalization(Function &F);
|
bool doFinalization(Function &F);
|
||||||
|
|
||||||
virtual PMDataManager *getAsPMDataManager() { return this; }
|
PMDataManager *getAsPMDataManager() override { return this; }
|
||||||
virtual Pass *getAsPass() { return this; }
|
Pass *getAsPass() override { return this; }
|
||||||
|
|
||||||
virtual const char *getPassName() const {
|
const char *getPassName() const override {
|
||||||
return "BasicBlock Pass Manager";
|
return "BasicBlock Pass Manager";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print passes managed by this manager
|
// Print passes managed by this manager
|
||||||
void dumpPassStructure(unsigned Offset) {
|
void dumpPassStructure(unsigned Offset) override {
|
||||||
dbgs().indent(Offset*2) << "BasicBlockPass Manager\n";
|
dbgs().indent(Offset*2) << "BasicBlockPass Manager\n";
|
||||||
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
||||||
BasicBlockPass *BP = getContainedPass(Index);
|
BasicBlockPass *BP = getContainedPass(Index);
|
||||||
@ -199,7 +199,7 @@ public:
|
|||||||
return BP;
|
return BP;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual PassManagerType getPassManagerType() const {
|
PassManagerType getPassManagerType() const override {
|
||||||
return PMT_BasicBlockPassManager;
|
return PMT_BasicBlockPassManager;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -234,7 +234,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// createPrinterPass - Get a function printer pass.
|
/// createPrinterPass - Get a function printer pass.
|
||||||
Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const {
|
Pass *createPrinterPass(raw_ostream &O,
|
||||||
|
const std::string &Banner) const override {
|
||||||
return createPrintFunctionPass(O, Banner);
|
return createPrintFunctionPass(O, Banner);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,21 +249,21 @@ public:
|
|||||||
|
|
||||||
/// doInitialization - Run all of the initializers for the function passes.
|
/// doInitialization - Run all of the initializers for the function passes.
|
||||||
///
|
///
|
||||||
bool doInitialization(Module &M);
|
bool doInitialization(Module &M) override;
|
||||||
|
|
||||||
/// doFinalization - Run all of the finalizers for the function passes.
|
/// doFinalization - Run all of the finalizers for the function passes.
|
||||||
///
|
///
|
||||||
bool doFinalization(Module &M);
|
bool doFinalization(Module &M) override;
|
||||||
|
|
||||||
|
|
||||||
virtual PMDataManager *getAsPMDataManager() { return this; }
|
PMDataManager *getAsPMDataManager() override { return this; }
|
||||||
virtual Pass *getAsPass() { return this; }
|
Pass *getAsPass() override { return this; }
|
||||||
virtual PassManagerType getTopLevelPassManagerType() {
|
PassManagerType getTopLevelPassManagerType() override {
|
||||||
return PMT_FunctionPassManager;
|
return PMT_FunctionPassManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Pass Manager itself does not invalidate any analysis info.
|
/// Pass Manager itself does not invalidate any analysis info.
|
||||||
void getAnalysisUsage(AnalysisUsage &Info) const {
|
void getAnalysisUsage(AnalysisUsage &Info) const override {
|
||||||
Info.setPreservesAll();
|
Info.setPreservesAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,7 +304,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// createPrinterPass - Get a module printer pass.
|
/// createPrinterPass - Get a module printer pass.
|
||||||
Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const {
|
Pass *createPrinterPass(raw_ostream &O,
|
||||||
|
const std::string &Banner) const override {
|
||||||
return createPrintModulePass(O, Banner);
|
return createPrintModulePass(O, Banner);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -323,29 +325,29 @@ public:
|
|||||||
bool doFinalization();
|
bool doFinalization();
|
||||||
|
|
||||||
/// Pass Manager itself does not invalidate any analysis info.
|
/// Pass Manager itself does not invalidate any analysis info.
|
||||||
void getAnalysisUsage(AnalysisUsage &Info) const {
|
void getAnalysisUsage(AnalysisUsage &Info) const override {
|
||||||
Info.setPreservesAll();
|
Info.setPreservesAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Add RequiredPass into list of lower level passes required by pass P.
|
/// Add RequiredPass into list of lower level passes required by pass P.
|
||||||
/// RequiredPass is run on the fly by Pass Manager when P requests it
|
/// RequiredPass is run on the fly by Pass Manager when P requests it
|
||||||
/// through getAnalysis interface.
|
/// through getAnalysis interface.
|
||||||
virtual void addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass);
|
void addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass) override;
|
||||||
|
|
||||||
/// Return function pass corresponding to PassInfo PI, that is
|
/// Return function pass corresponding to PassInfo PI, that is
|
||||||
/// required by module pass MP. Instantiate analysis pass, by using
|
/// required by module pass MP. Instantiate analysis pass, by using
|
||||||
/// its runOnFunction() for function F.
|
/// its runOnFunction() for function F.
|
||||||
virtual Pass* getOnTheFlyPass(Pass *MP, AnalysisID PI, Function &F);
|
Pass* getOnTheFlyPass(Pass *MP, AnalysisID PI, Function &F) override;
|
||||||
|
|
||||||
virtual const char *getPassName() const {
|
const char *getPassName() const override {
|
||||||
return "Module Pass Manager";
|
return "Module Pass Manager";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual PMDataManager *getAsPMDataManager() { return this; }
|
PMDataManager *getAsPMDataManager() override { return this; }
|
||||||
virtual Pass *getAsPass() { return this; }
|
Pass *getAsPass() override { return this; }
|
||||||
|
|
||||||
// Print passes managed by this manager
|
// Print passes managed by this manager
|
||||||
void dumpPassStructure(unsigned Offset) {
|
void dumpPassStructure(unsigned Offset) override {
|
||||||
dbgs().indent(Offset*2) << "ModulePass Manager\n";
|
dbgs().indent(Offset*2) << "ModulePass Manager\n";
|
||||||
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
|
||||||
ModulePass *MP = getContainedPass(Index);
|
ModulePass *MP = getContainedPass(Index);
|
||||||
@ -363,7 +365,7 @@ public:
|
|||||||
return static_cast<ModulePass *>(PassVector[N]);
|
return static_cast<ModulePass *>(PassVector[N]);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual PassManagerType getPassManagerType() const {
|
PassManagerType getPassManagerType() const override {
|
||||||
return PMT_ModulePassManager;
|
return PMT_ModulePassManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -403,7 +405,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// createPrinterPass - Get a module printer pass.
|
/// createPrinterPass - Get a module printer pass.
|
||||||
Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const {
|
Pass *createPrinterPass(raw_ostream &O,
|
||||||
|
const std::string &Banner) const override {
|
||||||
return createPrintModulePass(O, Banner);
|
return createPrintModulePass(O, Banner);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -423,13 +426,13 @@ public:
|
|||||||
bool doFinalization();
|
bool doFinalization();
|
||||||
|
|
||||||
/// Pass Manager itself does not invalidate any analysis info.
|
/// Pass Manager itself does not invalidate any analysis info.
|
||||||
void getAnalysisUsage(AnalysisUsage &Info) const {
|
void getAnalysisUsage(AnalysisUsage &Info) const override {
|
||||||
Info.setPreservesAll();
|
Info.setPreservesAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual PMDataManager *getAsPMDataManager() { return this; }
|
PMDataManager *getAsPMDataManager() override { return this; }
|
||||||
virtual Pass *getAsPass() { return this; }
|
Pass *getAsPass() override { return this; }
|
||||||
virtual PassManagerType getTopLevelPassManagerType() {
|
PassManagerType getTopLevelPassManagerType() override {
|
||||||
return PMT_ModulePassManager;
|
return PMT_ModulePassManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,8 +78,8 @@ public:
|
|||||||
/// the list.
|
/// the list.
|
||||||
void setAsFirstOperand(unsigned V) { this->setValPtrInt(V); }
|
void setAsFirstOperand(unsigned V) { this->setValPtrInt(V); }
|
||||||
|
|
||||||
virtual void deleted();
|
void deleted() override;
|
||||||
virtual void allUsesReplacedWith(Value *NV);
|
void allUsesReplacedWith(Value *NV) override;
|
||||||
};
|
};
|
||||||
} // end namespace llvm.
|
} // end namespace llvm.
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ namespace {
|
|||||||
VectorType &CFGOnlyList;
|
VectorType &CFGOnlyList;
|
||||||
GetCFGOnlyPasses(VectorType &L) : CFGOnlyList(L) {}
|
GetCFGOnlyPasses(VectorType &L) : CFGOnlyList(L) {}
|
||||||
|
|
||||||
void passEnumerate(const PassInfo *P) {
|
void passEnumerate(const PassInfo *P) override {
|
||||||
if (P->isCFGOnlyPass())
|
if (P->isCFGOnlyPass())
|
||||||
CFGOnlyList.push_back(P->getTypeInfo());
|
CFGOnlyList.push_back(P->getTypeInfo());
|
||||||
}
|
}
|
||||||
|
@ -2403,21 +2403,21 @@ struct VerifierLegacyPass : public FunctionPass {
|
|||||||
initializeVerifierLegacyPassPass(*PassRegistry::getPassRegistry());
|
initializeVerifierLegacyPassPass(*PassRegistry::getPassRegistry());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool runOnFunction(Function &F) {
|
bool runOnFunction(Function &F) override {
|
||||||
if (!V.verify(F) && FatalErrors)
|
if (!V.verify(F) && FatalErrors)
|
||||||
report_fatal_error("Broken function found, compilation aborted!");
|
report_fatal_error("Broken function found, compilation aborted!");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool doFinalization(Module &M) {
|
bool doFinalization(Module &M) override {
|
||||||
if (!V.verify(M) && FatalErrors)
|
if (!V.verify(M) && FatalErrors)
|
||||||
report_fatal_error("Broken module found, compilation aborted!");
|
report_fatal_error("Broken module found, compilation aborted!");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||||
AU.setPreservesAll();
|
AU.setPreservesAll();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user