[VPlan] Fix leak by manually cleaning up allocated Phi in test.
authorFlorian Hahn <flo@fhahn.com>
Tue, 24 Jan 2023 17:20:16 +0000 (17:20 +0000)
committerFlorian Hahn <flo@fhahn.com>
Tue, 24 Jan 2023 17:20:17 +0000 (17:20 +0000)
This should fix a LeakSanitizer failure reported here:
https://lab.llvm.org/buildbot/#/builders/5/builds/30952

llvm/unittests/Transforms/Vectorize/VPlanVerifierTest.cpp

index b41a8a2..7c252cf 100644 (file)
@@ -108,5 +108,7 @@ TEST(VPVerifierTest, VPBlendUseBeforeDefDifferentBB) {
 #if GTEST_HAS_STREAM_REDIRECTION
   EXPECT_STREQ("", ::testing::internal::GetCapturedStderr().c_str());
 #endif
+
+  delete Phi;
 }
 } // namespace