[BOLT] Replace the MCAsmLayout parameter with MCAssembler

Continue the MCAsmLayout removal work started by 67957a45ee.
This commit is contained in:
Fangrui Song
2024-07-01 18:02:34 -07:00
parent 057f28be3e
commit e3e0df391c
3 changed files with 5 additions and 9 deletions

View File

@@ -40,7 +40,6 @@
#include "llvm/DebugInfo/DWARF/DWARFDebugFrame.h"
#include "llvm/MC/MCAsmBackend.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCAsmLayout.h"
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCObjectStreamer.h"
#include "llvm/MC/MCStreamer.h"
@@ -3508,9 +3507,8 @@ void RewriteInstance::emitAndLink() {
updateOutputValues(*Linker);
if (opts::UpdateDebugSections) {
MCAsmLayout FinalLayout(
static_cast<MCObjectStreamer *>(Streamer.get())->getAssembler());
DebugInfoRewriter->updateLineTableOffsets(FinalLayout);
DebugInfoRewriter->updateLineTableOffsets(
static_cast<MCObjectStreamer &>(*Streamer).getAssembler());
}
if (RuntimeLibrary *RtLibrary = BC->getRuntimeLibrary())