diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2005-06-18 18:34:52 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2005-06-18 18:34:52 +0000 |
commit | 9144ec4764dfd4020db346ab4f92d59408b30744 (patch) | |
tree | 76c6702fa8341887545ebbfb922dd33eababceb6 /llvm/lib/Bytecode/Writer/Writer.cpp | |
parent | 4549a86233963ebfc1ce1e7ea33cfb6701b84546 (diff) | |
download | bcm5719-llvm-9144ec4764dfd4020db346ab4f92d59408b30744.tar.gz bcm5719-llvm-9144ec4764dfd4020db346ab4f92d59408b30744.zip |
core changes for varargs
llvm-svn: 22254
Diffstat (limited to 'llvm/lib/Bytecode/Writer/Writer.cpp')
-rw-r--r-- | llvm/lib/Bytecode/Writer/Writer.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/llvm/lib/Bytecode/Writer/Writer.cpp b/llvm/lib/Bytecode/Writer/Writer.cpp index fb5a1aa6031..90cfa96462a 100644 --- a/llvm/lib/Bytecode/Writer/Writer.cpp +++ b/llvm/lib/Bytecode/Writer/Writer.cpp @@ -439,7 +439,7 @@ void BytecodeWriter::outputInstructionFormat0(const Instruction *I, output_typeid(Type); // Result type unsigned NumArgs = I->getNumOperands(); - output_vbr(NumArgs + (isa<CastInst>(I) || isa<VANextInst>(I) || + output_vbr(NumArgs + (isa<CastInst>(I) || isa<VAArgInst>(I) || Opcode == 56 || Opcode == 58)); if (!isa<GetElementPtrInst>(&I)) { @@ -453,10 +453,6 @@ void BytecodeWriter::outputInstructionFormat0(const Instruction *I, int Slot = Table.getSlot(I->getType()); assert(Slot != -1 && "Cast return type unknown?"); output_typeid((unsigned)Slot); - } else if (const VANextInst *VAI = dyn_cast<VANextInst>(I)) { - int Slot = Table.getSlot(VAI->getArgType()); - assert(Slot != -1 && "VarArg argument type unknown?"); - output_typeid((unsigned)Slot); } else if (Opcode == 56) { // Invoke escape sequence output_vbr(cast<InvokeInst>(I)->getCallingConv()); } else if (Opcode == 58) { // Call escape sequence @@ -704,11 +700,6 @@ void BytecodeWriter::outputInstruction(const Instruction &I) { assert(Slots[1] != ~0U && "Cast return type unknown?"); if (Slots[1] > MaxOpSlot) MaxOpSlot = Slots[1]; NumOperands++; - } else if (const VANextInst *VANI = dyn_cast<VANextInst>(&I)) { - Slots[1] = Table.getSlot(VANI->getArgType()); - assert(Slots[1] != ~0U && "va_next return type unknown?"); - if (Slots[1] > MaxOpSlot) MaxOpSlot = Slots[1]; - NumOperands++; } else if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I)) { // We need to encode the type of sequential type indices into their slot # unsigned Idx = 1; |