mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +00:00
Use the const_cast only where necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182950 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1438,8 +1438,7 @@ void MCDwarfFrameEmitter::Emit(MCStreamer &Streamer,
|
|||||||
bool UsingCFI,
|
bool UsingCFI,
|
||||||
bool IsEH) {
|
bool IsEH) {
|
||||||
MCContext &Context = Streamer.getContext();
|
MCContext &Context = Streamer.getContext();
|
||||||
MCObjectFileInfo *MOFI =
|
const MCObjectFileInfo *MOFI = Context.getObjectFileInfo();
|
||||||
const_cast<MCObjectFileInfo*>(Context.getObjectFileInfo());
|
|
||||||
FrameEmitterImpl Emitter(UsingCFI, IsEH);
|
FrameEmitterImpl Emitter(UsingCFI, IsEH);
|
||||||
ArrayRef<MCDwarfFrameInfo> FrameArray = Streamer.getFrameInfos();
|
ArrayRef<MCDwarfFrameInfo> FrameArray = Streamer.getFrameInfos();
|
||||||
|
|
||||||
@ -1458,8 +1457,9 @@ void MCDwarfFrameEmitter::Emit(MCStreamer &Streamer,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const MCSection &Section = IsEH ? *MOFI->getEHFrameSection() :
|
const MCSection &Section =
|
||||||
*MOFI->getDwarfFrameSection();
|
IsEH ? *const_cast<MCObjectFileInfo*>(MOFI)->getEHFrameSection() :
|
||||||
|
*MOFI->getDwarfFrameSection();
|
||||||
Streamer.SwitchSection(&Section);
|
Streamer.SwitchSection(&Section);
|
||||||
MCSymbol *SectionStart = Context.CreateTempSymbol();
|
MCSymbol *SectionStart = Context.CreateTempSymbol();
|
||||||
Streamer.EmitLabel(SectionStart);
|
Streamer.EmitLabel(SectionStart);
|
||||||
|
Reference in New Issue
Block a user