File tree 3 files changed +5
-9
lines changed
3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 16
16
#include " llvm/ADT/StringRef.h"
17
17
#include " llvm/CodeGen/DIE.h"
18
18
#include " llvm/DWP/DWP.h"
19
- #include " llvm/MC/MCAsmLayout.h"
20
19
#include " llvm/MC/MCContext.h"
21
20
#include " llvm/Support/ToolOutputFile.h"
22
21
#include < cstdint>
@@ -183,7 +182,7 @@ class DWARFRewriter {
183
182
void updateDebugInfo ();
184
183
185
184
// / Update stmt_list for CUs based on the new .debug_line \p Layout.
186
- void updateLineTableOffsets (const MCAsmLayout &Layout );
185
+ void updateLineTableOffsets (const MCAssembler &Asm );
187
186
188
187
uint64_t getDwoRangesBase (uint64_t DWOId) { return DwoRangesBase[DWOId]; }
189
188
Original file line number Diff line number Diff line change 29
29
#include " llvm/DebugInfo/DWARF/DWARFTypeUnit.h"
30
30
#include " llvm/DebugInfo/DWARF/DWARFUnit.h"
31
31
#include " llvm/MC/MCAsmBackend.h"
32
- #include " llvm/MC/MCAsmLayout.h"
33
32
#include " llvm/MC/MCAssembler.h"
34
33
#include " llvm/MC/MCObjectWriter.h"
35
34
#include " llvm/MC/MCStreamer.h"
@@ -1352,7 +1351,7 @@ void DWARFRewriter::updateDWARFObjectAddressRanges(
1352
1351
}
1353
1352
}
1354
1353
1355
- void DWARFRewriter::updateLineTableOffsets (const MCAsmLayout &Layout ) {
1354
+ void DWARFRewriter::updateLineTableOffsets (const MCAssembler &Asm ) {
1356
1355
ErrorOr<BinarySection &> DbgInfoSection =
1357
1356
BC.getUniqueSectionByName (" .debug_info" );
1358
1357
ErrorOr<BinarySection &> TypeInfoSection =
@@ -1394,7 +1393,7 @@ void DWARFRewriter::updateLineTableOffsets(const MCAsmLayout &Layout) {
1394
1393
continue ;
1395
1394
1396
1395
const uint64_t LineTableOffset =
1397
- Layout. getAssembler () .getSymbolOffset (*Label);
1396
+ Asm .getSymbolOffset (*Label);
1398
1397
DebugLineOffsetMap[*StmtOffset] = LineTableOffset;
1399
1398
assert (DbgInfoSection && " .debug_info section must exist" );
1400
1399
LineTablePatchMap[CU.get ()] = LineTableOffset;
Original file line number Diff line number Diff line change 40
40
#include " llvm/DebugInfo/DWARF/DWARFDebugFrame.h"
41
41
#include " llvm/MC/MCAsmBackend.h"
42
42
#include " llvm/MC/MCAsmInfo.h"
43
- #include " llvm/MC/MCAsmLayout.h"
44
43
#include " llvm/MC/MCDisassembler/MCDisassembler.h"
45
44
#include " llvm/MC/MCObjectStreamer.h"
46
45
#include " llvm/MC/MCStreamer.h"
@@ -3508,9 +3507,8 @@ void RewriteInstance::emitAndLink() {
3508
3507
updateOutputValues (*Linker);
3509
3508
3510
3509
if (opts::UpdateDebugSections) {
3511
- MCAsmLayout FinalLayout (
3512
- static_cast <MCObjectStreamer *>(Streamer.get ())->getAssembler ());
3513
- DebugInfoRewriter->updateLineTableOffsets (FinalLayout);
3510
+ DebugInfoRewriter->updateLineTableOffsets (
3511
+ static_cast <MCObjectStreamer &>(*Streamer).getAssembler ());
3514
3512
}
3515
3513
3516
3514
if (RuntimeLibrary *RtLibrary = BC->getRuntimeLibrary ())
You can’t perform that action at this time.
0 commit comments