diff options
author | Fangrui Song <i@maskray.me> | 2025-06-29 18:56:02 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2025-06-29 18:56:02 -0700 |
commit | e47d4010d34119c2b4a28e7609fde35449a8b437 (patch) | |
tree | e2873304d607922b49ebb13a1d639870fff56c2d /llvm/lib/MC/MCCodeView.cpp | |
parent | 9a6e0688b04f1122012548b5f7d627ed347acfba (diff) | |
download | llvm-e47d4010d34119c2b4a28e7609fde35449a8b437.zip llvm-e47d4010d34119c2b4a28e7609fde35449a8b437.tar.gz llvm-e47d4010d34119c2b4a28e7609fde35449a8b437.tar.bz2 |
CodeView: Move MCCVDefRangeFragment storage to MCContext/MCFragment
Work toward making ~MCCVInlineLineTableFragment trivial.
Diffstat (limited to 'llvm/lib/MC/MCCodeView.cpp')
-rw-r--r-- | llvm/lib/MC/MCCodeView.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCCodeView.cpp b/llvm/lib/MC/MCCodeView.cpp index 1407bc5..e053747 100644 --- a/llvm/lib/MC/MCCodeView.cpp +++ b/llvm/lib/MC/MCCodeView.cpp @@ -444,6 +444,11 @@ MCFragment *CodeViewContext::emitDefRange( StringRef FixedSizePortion) { // Create and insert a fragment into the current section that will be encoded // later. + FixedSizePortion = MCCtx->allocateString(FixedSizePortion); + auto Pos = DefRangeStorage.size(); + llvm::append_range(DefRangeStorage, Ranges); + if (!Ranges.empty()) + Ranges = {&DefRangeStorage[Pos], Ranges.size()}; auto *F = MCCtx->allocFragment<MCCVDefRangeFragment>(Ranges, FixedSizePortion); OS.insert(F); |