[llvm] [MC] Add MCFragment allocation helpers (PR #95197)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 12 01:00:35 PDT 2024
================
@@ -195,6 +195,15 @@ MCInst *MCContext::createMCInst() {
return new (MCInstAllocator.Allocate()) MCInst;
}
+// Allocate the initial MCDataFragment for the begin symbol.
+MCDataFragment *MCContext::allocInitialFragment(MCSection &Sec) {
+ assert(!Sec.curFragList()->Head);
+ auto *F = allocFragment<MCDataFragment>();
----------------
aengelke wrote:
Is the plan to remove the Parent parameter from MCFragment? Otherwise, shouldn't `allocFragment<MCDataFragment>(&Sec);` work?
https://github.com/llvm/llvm-project/pull/95197
More information about the llvm-commits
mailing list