[llvm] ca8b0b4 - [VPlan] Fix leak by manually cleaning up allocated Phi in test.

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 09:20:36 PST 2023


Author: Florian Hahn
Date: 2023-01-24T17:20:17Z
New Revision: ca8b0b4af42499669573fdfe6e3bb87feb2f6b69

URL: https://github.com/llvm/llvm-project/commit/ca8b0b4af42499669573fdfe6e3bb87feb2f6b69
DIFF: https://github.com/llvm/llvm-project/commit/ca8b0b4af42499669573fdfe6e3bb87feb2f6b69.diff

LOG: [VPlan] Fix leak by manually cleaning up allocated Phi in test.

This should fix a LeakSanitizer failure reported here:
https://lab.llvm.org/buildbot/#/builders/5/builds/30952

Added: 
    

Modified: 
    llvm/unittests/Transforms/Vectorize/VPlanVerifierTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Transforms/Vectorize/VPlanVerifierTest.cpp b/llvm/unittests/Transforms/Vectorize/VPlanVerifierTest.cpp
index b41a8a26fd655..7c252cf2c4fbb 100644
--- a/llvm/unittests/Transforms/Vectorize/VPlanVerifierTest.cpp
+++ b/llvm/unittests/Transforms/Vectorize/VPlanVerifierTest.cpp
@@ -108,5 +108,7 @@ TEST(VPVerifierTest, VPBlendUseBeforeDefDifferentBB) {
 #if GTEST_HAS_STREAM_REDIRECTION
   EXPECT_STREQ("", ::testing::internal::GetCapturedStderr().c_str());
 #endif
+
+  delete Phi;
 }
 } // namespace


        


More information about the llvm-commits mailing list