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

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 23:31:01 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>(
----------------
aengelke wrote:

MachOStreamer is not a fragment.

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


More information about the llvm-commits mailing list