aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Reader
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-08 02:44:12 +0000
committerChris Lattner <sabre@nondot.org>2003-05-08 02:44:12 +0000
commit8f77daef04355c00b78b645f5aae5694e7a8b631 (patch)
tree44b5b785fe68c331d24b79ca5f6faa3850b9d586 /lib/Bytecode/Reader
parent97b315a58581261ec4bd6430ec9b438ba5fb728e (diff)
Add support for the new va_arg instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6029 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Reader')
-rw-r--r--lib/Bytecode/Reader/InstructionReader.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Bytecode/Reader/InstructionReader.cpp b/lib/Bytecode/Reader/InstructionReader.cpp
index e2c8336e95..2fc52ad71a 100644
--- a/lib/Bytecode/Reader/InstructionReader.cpp
+++ b/lib/Bytecode/Reader/InstructionReader.cpp
@@ -130,11 +130,15 @@ bool BytecodeParser::ParseInstruction(const uchar *&Buf, const uchar *EndBuf,
Value *V;
switch (Raw.Opcode) {
+ case Instruction::VarArg:
case Instruction::Cast: {
V = getValue(Raw.Ty, Raw.Arg1);
const Type *Ty = getType(Raw.Arg2);
if (V == 0 || Ty == 0) { std::cerr << "Invalid cast!\n"; return true; }
- Res = new CastInst(V, Ty);
+ if (Raw.Opcode == Instruction::Cast)
+ Res = new CastInst(V, Ty);
+ else
+ Res = new VarArgInst(V, Ty);
return false;
}
case Instruction::PHINode: {