diff options
Diffstat (limited to 'lib/Bytecode/Reader/InstructionReader.cpp')
-rw-r--r-- | lib/Bytecode/Reader/InstructionReader.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Bytecode/Reader/InstructionReader.cpp b/lib/Bytecode/Reader/InstructionReader.cpp index 80127cef8c..d08d19b6bd 100644 --- a/lib/Bytecode/Reader/InstructionReader.cpp +++ b/lib/Bytecode/Reader/InstructionReader.cpp @@ -106,8 +106,7 @@ bool BytecodeParser::ParseInstruction(const uchar *&Buf, const uchar *EndBuf, getValue(Raw.Ty, Raw.Arg2)); return false; } else if (Raw.Opcode == Instruction::Cast) { - Res = UnaryOperator::create(Instruction::Cast, getValue(Raw.Ty, Raw.Arg1), - getType(Raw.Arg2)); + Res = new CastInst(getValue(Raw.Ty, Raw.Arg1), getType(Raw.Arg2)); return false; } else if (Raw.Opcode == Instruction::PHINode) { PHINode *PN = new PHINode(Raw.Ty); |