summaryrefslogtreecommitdiff
path: root/include/llvm/IR/InstrTypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IR/InstrTypes.h')
-rw-r--r--include/llvm/IR/InstrTypes.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/include/llvm/IR/InstrTypes.h b/include/llvm/IR/InstrTypes.h
index d16a5d318d78..61ca90de7393 100644
--- a/include/llvm/IR/InstrTypes.h
+++ b/include/llvm/IR/InstrTypes.h
@@ -65,27 +65,15 @@ protected:
// Out of line virtual method, so the vtable, etc has a home.
~TerminatorInst() override;
- /// Virtual methods - Terminators should overload these and provide inline
- /// overrides of non-V methods.
- virtual BasicBlock *getSuccessorV(unsigned idx) const = 0;
- virtual unsigned getNumSuccessorsV() const = 0;
- virtual void setSuccessorV(unsigned idx, BasicBlock *B) = 0;
-
public:
/// Return the number of successors that this terminator has.
- unsigned getNumSuccessors() const {
- return getNumSuccessorsV();
- }
+ unsigned getNumSuccessors() const;
/// Return the specified successor.
- BasicBlock *getSuccessor(unsigned idx) const {
- return getSuccessorV(idx);
- }
+ BasicBlock *getSuccessor(unsigned idx) const;
/// Update the specified successor to point at the provided block.
- void setSuccessor(unsigned idx, BasicBlock *B) {
- setSuccessorV(idx, B);
- }
+ void setSuccessor(unsigned idx, BasicBlock *B);
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {