Whoa, we were misreading invoke instructions "normal" destinations quite badly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8363 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bytecode/Reader/InstructionReader.cpp b/lib/Bytecode/Reader/InstructionReader.cpp
index 2ab68bb..c0bccd4 100644
--- a/lib/Bytecode/Reader/InstructionReader.cpp
+++ b/lib/Bytecode/Reader/InstructionReader.cpp
@@ -302,7 +302,7 @@
if (Raw.NumOperands < 3) return true;
Normal = cast<BasicBlock>(getValue(Type::LabelTy, Raw.Arg2));
- if (Raw.NumOperands == 3)
+ if (Raw.NumOperands == 3)
Except = cast<BasicBlock>(getValue(Type::LabelTy, Raw.Arg3));
else {
Except = cast<BasicBlock>(getValue(Type::LabelTy, args[0]));
@@ -318,7 +318,7 @@
} else {
if (args.size() < 4) return true;
- Normal = cast<BasicBlock>(getValue(Type::LabelTy, args[0]));
+ Normal = cast<BasicBlock>(getValue(Type::LabelTy, args[1]));
Except = cast<BasicBlock>(getValue(Type::LabelTy, args[2]));
if ((args.size() & 1) != 0)