[llvm] r335862 - [PhiValues] Adjust unit test to invalidate instructions before deleting them
John Brawn via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 28 08:17:07 PDT 2018
Author: john.brawn
Date: Thu Jun 28 08:17:07 2018
New Revision: 335862
URL: http://llvm.org/viewvc/llvm-project?rev=335862&view=rev
Log:
[PhiValues] Adjust unit test to invalidate instructions before deleting them
This should fix a sanitizer buildbot failure.
Modified:
llvm/trunk/unittests/Analysis/PhiValuesTest.cpp
Modified: llvm/trunk/unittests/Analysis/PhiValuesTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Analysis/PhiValuesTest.cpp?rev=335862&r1=335861&r2=335862&view=diff
==============================================================================
--- llvm/trunk/unittests/Analysis/PhiValuesTest.cpp (original)
+++ llvm/trunk/unittests/Analysis/PhiValuesTest.cpp Thu Jun 28 08:17:07 2018
@@ -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);
More information about the llvm-commits
mailing list