[llvm] [MC] Add MCFragment allocation helpers (PR #95197)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 13 14:41:30 PDT 2024


================
@@ -566,9 +568,9 @@ MCStreamer *llvm::createMachOStreamer(MCContext &Context,
                                       std::unique_ptr<MCCodeEmitter> &&CE,
                                       bool DWARFMustBeAtTheEnd,
                                       bool LabelSections) {
-  MCMachOStreamer *S =
-      new MCMachOStreamer(Context, std::move(MAB), std::move(OW), std::move(CE),
-                          DWARFMustBeAtTheEnd, LabelSections);
+  MCMachOStreamer *S = Context.allocFragment<MCMachOStreamer>(
----------------
MaskRay wrote:

Thanks for the catch

https://github.com/llvm/llvm-project/pull/95197


More information about the llvm-commits mailing list