[PhiValues] Adjust unit test to invalidate instructions before deleting them

This should fix a sanitizer buildbot failure.

llvm-svn: 335862
This commit is contained in:
John Brawn 2018-06-28 15:17:07 +00:00
parent 5f6e51d54c
commit aa8a88af05
1 changed files with 1 additions and 1 deletions

View File

@ -194,8 +194,8 @@ TEST(PhiValuesTest, DependentPhi) {
// Check that replacing an incoming phi then deleting it works
Phi3->setIncomingValue(1, Val2);
Phi2->eraseFromParent();
PV.invalidateValue(Phi2);
Phi2->eraseFromParent();
PV.invalidateValue(Phi3);
Vals = PV.getValuesForPhi(Phi1);
EXPECT_EQ(Vals.size(), 2u);