summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Reader/InstructionReader.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-08-14 18:24:09 +0000
committerChris Lattner <sabre@nondot.org>2002-08-14 18:24:09 +0000
commit330b7ac76ca31e49da0ee6a1a3349a6ff86e150b (patch)
tree51d69482f788499c3448374bc4f60ddef53a7394 /llvm/lib/Bytecode/Reader/InstructionReader.cpp
parentb80b69cc3e6d865b4f4900bae758c3d6aeff7383 (diff)
downloadbcm5719-llvm-330b7ac76ca31e49da0ee6a1a3349a6ff86e150b.tar.gz
bcm5719-llvm-330b7ac76ca31e49da0ee6a1a3349a6ff86e150b.zip
Remove support for Not ConstantExpr. This simplifies the unary case to only
have to support the cast instruction, so the function is renamed to getCast. llvm-svn: 3328
Diffstat (limited to 'llvm/lib/Bytecode/Reader/InstructionReader.cpp')
-rw-r--r--llvm/lib/Bytecode/Reader/InstructionReader.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/Bytecode/Reader/InstructionReader.cpp b/llvm/lib/Bytecode/Reader/InstructionReader.cpp
index 0916b2b876a..0de8f39c579 100644
--- a/llvm/lib/Bytecode/Reader/InstructionReader.cpp
+++ b/llvm/lib/Bytecode/Reader/InstructionReader.cpp
@@ -122,13 +122,8 @@ bool BytecodeParser::ParseInstruction(const uchar *&Buf, const uchar *EndBuf,
if (ParseRawInst(Buf, EndBuf, Raw))
return failure(true);
- if (Raw.Opcode >= Instruction::FirstUnaryOp &&
- Raw.Opcode < Instruction::NumUnaryOps && Raw.NumOperands == 1) {
- Res = UnaryOperator::create((Instruction::UnaryOps)Raw.Opcode,
- getValue(Raw.Ty,Raw.Arg1));
- return false;
- } else if (Raw.Opcode >= Instruction::FirstBinaryOp &&
- Raw.Opcode < Instruction::NumBinaryOps && Raw.NumOperands == 2) {
+ if (Raw.Opcode >= Instruction::FirstBinaryOp &&
+ Raw.Opcode < Instruction::NumBinaryOps && Raw.NumOperands == 2) {
Res = BinaryOperator::create((Instruction::BinaryOps)Raw.Opcode,
getValue(Raw.Ty, Raw.Arg1),
getValue(Raw.Ty, Raw.Arg2));
OpenPOWER on IntegriCloud