[llvm] 80b9f07 - [VPlan] Suppress leak in test (#114624)

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 16:27:02 PDT 2024


Author: Vitaly Buka
Date: 2024-11-01T16:26:59-07:00
New Revision: 80b9f07436617d650bdab7035394705f643d1b19

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

LOG: [VPlan] Suppress leak in test (#114624)

Probably needs a better fix. #114623

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp b/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
index 0f1b52bd453e0f..4a8615cc086b08 100644
--- a/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
+++ b/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
@@ -732,8 +732,9 @@ TEST(VPBasicBlockTest, print) {
 
   LLVMContext C;
   auto *ScalarHeader = BasicBlock::Create(C, "");
-  VPIRBasicBlock *ScalarHeaderVPBB = new VPIRBasicBlock(ScalarHeader);
-  VPlan Plan(VPBB0, TC, VPBB1, ScalarHeaderVPBB);
+  // FIXME: This looks wrong.
+  auto ScalarHeaderVPBB = std::make_unique<VPIRBasicBlock>(ScalarHeader);
+  VPlan Plan(VPBB0, TC, VPBB1, ScalarHeaderVPBB.get());
   std::string FullDump;
   raw_string_ostream OS(FullDump);
   Plan.printDOT(OS);


        


More information about the llvm-commits mailing list