diff options
author | Chris Lattner <sabre@nondot.org> | 2001-07-07 19:24:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-07-07 19:24:15 +0000 |
commit | a41f50dea8573e4a610b5aa5e45b5c368559b084 (patch) | |
tree | 4e4bc17fa7fffd16e0f99e9229015ca6654ef802 /lib/Bytecode/Writer/InstructionWriter.cpp | |
parent | 30f24a402c27919e4809f6a54ec4046a921a889f (diff) |
Broad superficial changes:
* Renamed getOpcode to getOpcodeName
* Changed getOpcodeName to return a const char * instead of string
* Added a getOpcode method to replace getInstType
* Changed code to use getOpcode instead of getInstType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Writer/InstructionWriter.cpp')
-rw-r--r-- | lib/Bytecode/Writer/InstructionWriter.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Bytecode/Writer/InstructionWriter.cpp b/lib/Bytecode/Writer/InstructionWriter.cpp index 0cd93c04fd..3bd9a0902b 100644 --- a/lib/Bytecode/Writer/InstructionWriter.cpp +++ b/lib/Bytecode/Writer/InstructionWriter.cpp @@ -29,7 +29,7 @@ static void outputInstructionFormat0(const Instruction *I, const SlotCalculator &Table, unsigned Type, vector<uchar> &Out) { // Opcode must have top two bits clear... - output_vbr(I->getInstType(), Out); // Instruction Opcode ID + output_vbr(I->getOpcode(), Out); // Instruction Opcode ID output_vbr(Type, Out); // Result type unsigned NumArgs = I->getNumOperands(); @@ -51,7 +51,7 @@ static void outputInstructionFormat0(const Instruction *I, static void outputInstructionFormat1(const Instruction *I, const SlotCalculator &Table, int *Slots, unsigned Type, vector<uchar> &Out) { - unsigned IType = I->getInstType(); // Instruction Opcode ID + unsigned IType = I->getOpcode(); // Instruction Opcode ID // bits Instruction format: // -------------------------- @@ -72,7 +72,7 @@ static void outputInstructionFormat1(const Instruction *I, static void outputInstructionFormat2(const Instruction *I, const SlotCalculator &Table, int *Slots, unsigned Type, vector<uchar> &Out) { - unsigned IType = I->getInstType(); // Instruction Opcode ID + unsigned IType = I->getOpcode(); // Instruction Opcode ID // bits Instruction format: // -------------------------- @@ -96,7 +96,7 @@ static void outputInstructionFormat2(const Instruction *I, static void outputInstructionFormat3(const Instruction *I, const SlotCalculator &Table, int *Slots, unsigned Type, vector<uchar> &Out) { - unsigned IType = I->getInstType(); // Instruction Opcode ID + unsigned IType = I->getOpcode(); // Instruction Opcode ID // bits Instruction format: // -------------------------- @@ -115,7 +115,7 @@ static void outputInstructionFormat3(const Instruction *I, } bool BytecodeWriter::processInstruction(const Instruction *I) { - assert(I->getInstType() < 64 && "Opcode too big???"); + assert(I->getOpcode() < 64 && "Opcode too big???"); unsigned NumOperands = I->getNumOperands(); int MaxOpSlot = 0; @@ -136,8 +136,8 @@ bool BytecodeWriter::processInstruction(const Instruction *I) { // we take the type of the instruction itself. // const Type *Ty = NumOperands ? I->getOperand(0)->getType() : I->getType(); - if (I->getInstType() == Instruction::Malloc || - I->getInstType() == Instruction::Alloca) + if (I->getOpcode() == Instruction::Malloc || + I->getOpcode() == Instruction::Alloca) Ty = I->getType(); // Malloc & Alloca ALWAYS want to encode the return type unsigned Type; |