diff options
Diffstat (limited to 'llvm/lib/MC/MCCodeView.cpp')
-rw-r--r-- | llvm/lib/MC/MCCodeView.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/MC/MCCodeView.cpp b/llvm/lib/MC/MCCodeView.cpp index d234ce1..713ae07 100644 --- a/llvm/lib/MC/MCCodeView.cpp +++ b/llvm/lib/MC/MCCodeView.cpp @@ -26,8 +26,6 @@ using namespace llvm; using namespace llvm::codeview; -CodeViewContext::CodeViewContext() = default; - CodeViewContext::~CodeViewContext() { // If someone inserted strings into the string table but never actually // emitted them somewhere, clean up the fragment. @@ -138,7 +136,7 @@ void CodeViewContext::recordCVLoc(MCContext &Ctx, const MCSymbol *Label, MCDataFragment *CodeViewContext::getStringTableFragment() { if (!StrTabFragment) { - StrTabFragment = new MCDataFragment(); + StrTabFragment = MCCtx->allocFragment<MCDataFragment>(); // Start a new string table out with a null byte. StrTabFragment->getContents().push_back('\0'); } @@ -450,9 +448,9 @@ void CodeViewContext::emitInlineLineTableForFunction(MCObjectStreamer &OS, const MCSymbol *FnEndSym) { // Create and insert a fragment into the current section that will be encoded // later. - new MCCVInlineLineTableFragment(PrimaryFunctionId, SourceFileId, - SourceLineNum, FnStartSym, FnEndSym, - OS.getCurrentSectionOnly()); + auto *F = MCCtx->allocFragment<MCCVInlineLineTableFragment>( + PrimaryFunctionId, SourceFileId, SourceLineNum, FnStartSym, FnEndSym); + OS.insert(F); } MCFragment *CodeViewContext::emitDefRange( @@ -461,8 +459,10 @@ MCFragment *CodeViewContext::emitDefRange( StringRef FixedSizePortion) { // Create and insert a fragment into the current section that will be encoded // later. - return new MCCVDefRangeFragment(Ranges, FixedSizePortion, - OS.getCurrentSectionOnly()); + auto *F = + MCCtx->allocFragment<MCCVDefRangeFragment>(Ranges, FixedSizePortion); + OS.insert(F); + return F; } static unsigned computeLabelDiff(MCAsmLayout &Layout, const MCSymbol *Begin, |