summaryrefslogtreecommitdiff
path: root/include/llvm/iMemory.h
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2002-07-14 22:48:20 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2002-07-14 22:48:20 +0000
commit5814008f4b77774c8563578e1562c9c24a6750c2 (patch)
tree9743ae14c322aa57ec4cf1bb13b7dad94bf23415 /include/llvm/iMemory.h
parent29ab9f83481cd21abf3055c7c32ea1df953ae167 (diff)
downloadllvm-5814008f4b77774c8563578e1562c9c24a6750c2.tar.gz
llvm-5814008f4b77774c8563578e1562c9c24a6750c2.tar.bz2
llvm-5814008f4b77774c8563578e1562c9c24a6750c2.tar.xz
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/iMemory.h')
-rw-r--r--include/llvm/iMemory.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/include/llvm/iMemory.h b/include/llvm/iMemory.h
index 8a88c32181..1820e3c6b2 100644
--- a/include/llvm/iMemory.h
+++ b/include/llvm/iMemory.h
@@ -71,8 +71,6 @@ struct MallocInst : public AllocationInst {
return new MallocInst((Type*)getType(), (Value*)Operands[0].get());
}
- virtual const char *getOpcodeName() const { return "malloc"; }
-
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const MallocInst *) { return true; }
static inline bool classof(const Instruction *I) {
@@ -96,8 +94,6 @@ struct AllocaInst : public AllocationInst {
return new AllocaInst((Type*)getType(), (Value*)Operands[0].get());
}
- virtual const char *getOpcodeName() const { return "alloca"; }
-
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const AllocaInst *) { return true; }
static inline bool classof(const Instruction *I) {
@@ -118,8 +114,6 @@ struct FreeInst : public Instruction {
virtual Instruction *clone() const { return new FreeInst(Operands[0]); }
- virtual const char *getOpcodeName() const { return "free"; }
-
virtual bool hasSideEffects() const { return true; }
// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -210,7 +204,6 @@ public:
LoadInst(Value *Ptr, const std::string &Name = "");
virtual Instruction *clone() const { return new LoadInst(*this); }
- virtual const char *getOpcodeName() const { return "load"; }
virtual unsigned getFirstIndexOperandNumber() const { return 1; }
@@ -240,8 +233,6 @@ public:
StoreInst(Value *Val, Value *Ptr);
virtual Instruction *clone() const { return new StoreInst(*this); }
- virtual const char *getOpcodeName() const { return "store"; }
-
virtual bool hasSideEffects() const { return true; }
virtual unsigned getFirstIndexOperandNumber() const { return 2; }
@@ -271,7 +262,6 @@ public:
GetElementPtrInst(Value *Ptr, const std::vector<Value*> &Idx,
const std::string &Name = "");
virtual Instruction *clone() const { return new GetElementPtrInst(*this); }
- virtual const char *getOpcodeName() const { return "getelementptr"; }
virtual unsigned getFirstIndexOperandNumber() const { return 1; }
// getType - Overload to return most specific pointer type...