From 5814008f4b77774c8563578e1562c9c24a6750c2 Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Sun, 14 Jul 2002 22:48:20 +0000 Subject: 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 --- include/llvm/iMemory.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'include/llvm/iMemory.h') 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 &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... -- cgit v1.2.3