aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Reader/Reader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bytecode/Reader/Reader.cpp')
-rw-r--r--lib/Bytecode/Reader/Reader.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index 4011af7b04..67726eb2c1 100644
--- a/lib/Bytecode/Reader/Reader.cpp
+++ b/lib/Bytecode/Reader/Reader.cpp
@@ -199,10 +199,7 @@ BasicBlock *BytecodeParser::ParseBasicBlock(const unsigned char *&Buf,
BB = ParsedBasicBlocks[BlockNo];
while (Buf < EndBuf) {
- Instruction *Inst;
- ParseInstruction(Buf, EndBuf, Inst);
-
- if (Inst == 0) { throw std::string("Could not parse Instruction."); }
+ Instruction *Inst = ParseInstruction(Buf, EndBuf);
if (insertValue(Inst, Values) == -1) {
throw std::string("Could not insert value.");
}