[PATCH] D105286: Fix memory leaks
Boleyn Su via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 1 07:53:32 PDT 2021
boleyn.su updated this revision to Diff 355881.
boleyn.su added a comment.
Fix a compile error :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105286/new/
https://reviews.llvm.org/D105286
Files:
llvm/include/llvm/IR/PassManager.h
Index: llvm/include/llvm/IR/PassManager.h
===================================================================
--- llvm/include/llvm/IR/PassManager.h
+++ llvm/include/llvm/IR/PassManager.h
@@ -544,7 +544,7 @@
detail::PassModel<IRUnitT, PassT, PreservedAnalyses, AnalysisManagerT,
ExtraArgTs...>;
- Passes.emplace_back(new PassModelT(std::move(Pass)));
+ Passes.emplace_back(std::make_shared<PassModelT>(std::move(Pass)));
}
/// When adding a pass manager pass that has the same type as this pass
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105286.355881.patch
Type: text/x-patch
Size: 547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210701/9f63fea9/attachment.bin>
More information about the llvm-commits
mailing list