diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-07-14 22:48:20 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-07-14 22:48:20 +0000 |
commit | 5814008f4b77774c8563578e1562c9c24a6750c2 (patch) | |
tree | 9743ae14c322aa57ec4cf1bb13b7dad94bf23415 /include/llvm/iTerminators.h | |
parent | 29ab9f83481cd21abf3055c7c32ea1df953ae167 (diff) | |
download | external_llvm-5814008f4b77774c8563578e1562c9c24a6750c2.zip external_llvm-5814008f4b77774c8563578e1562c9c24a6750c2.tar.gz external_llvm-5814008f4b77774c8563578e1562c9c24a6750c2.tar.bz2 |
Create a static version of Instruction::getOpcodeName(opCode) that
can be invoked with only an opcode (i.e., without an instruction).
Move all opCode->opCodeName translations there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2892 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/iTerminators.h')
-rw-r--r-- | include/llvm/iTerminators.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/include/llvm/iTerminators.h b/include/llvm/iTerminators.h index b17029b..9a42152 100644 --- a/include/llvm/iTerminators.h +++ b/include/llvm/iTerminators.h @@ -39,8 +39,6 @@ public: virtual Instruction *clone() const { return new ReturnInst(*this); } - virtual const char *getOpcodeName() const { return "ret"; } - inline const Value *getReturnValue() const { return Operands.size() ? Operands[0].get() : 0; } @@ -89,8 +87,6 @@ public: return isUnconditional() ? 0 : Operands[2].get(); } - virtual const char *getOpcodeName() const { return "br"; } - // setUnconditionalDest - Change the current branch to an unconditional branch // targeting the specified block. // @@ -153,8 +149,6 @@ public: void dest_push_back(Constant *OnVal, BasicBlock *Dest); - virtual const char *getOpcodeName() const { return "switch"; } - virtual const BasicBlock *getSuccessor(unsigned idx) const { assert(idx < getNumSuccessors() &&"Successor idx out of range for switch!"); return cast<BasicBlock>(Operands[idx*2+1].get()); @@ -241,8 +235,6 @@ public: Operands[2] = (Value*)B; } - virtual const char *getOpcodeName() const { return "invoke"; } - virtual const BasicBlock *getSuccessor(unsigned i) const { assert(i < 2 && "Successor # out of range for invoke!"); return i == 0 ? getNormalDest() : getExceptionalDest(); |