forked from OSchip/llvm-project
Don't replace *all* uses with the new stuff.
This is not necessarily the first or dominating use of the EH values. The IR breaks if it's not. So replace the specific value in the instruction with the new value. llvm-svn: 138406
This commit is contained in:
parent
fba570c9d8
commit
2d4f0bea57
|
@ -347,7 +347,7 @@ static void ReplaceLandingPadVal(Function &F, Instruction *Inst, Value *ExnAddr,
|
|||
continue;
|
||||
}
|
||||
|
||||
Inst->replaceAllUsesWith(CreateLandingPadLoad(F, ExnAddr, SelAddr, I));
|
||||
I->replaceUsesOfWith(Inst, CreateLandingPadLoad(F, ExnAddr, SelAddr, I));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue