LVI: Fix use-of-uninitialized-value after r294463

BlockValueStack can be reallocated making reference e invalid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294572 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Vitaly Buka 2017-02-09 09:28:05 +00:00
parent e75e780ee4
commit 82afb7ea06

View File

@ -677,7 +677,7 @@ void LazyValueInfoImpl::solve() {
BlockValueStack.clear();
return;
}
std::pair<BasicBlock *, Value *> &e = BlockValueStack.back();
std::pair<BasicBlock *, Value *> e = BlockValueStack.back();
assert(BlockValueSet.count(e) && "Stack value should be in BlockValueSet!");
if (solveBlockValue(e.second, e.first)) {