mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33: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:
parent
b54d29735a
commit
79b40f10c0
@ -1438,8 +1438,7 @@ void MCDwarfFrameEmitter::Emit(MCStreamer &Streamer,
|
||||
bool UsingCFI,
|
||||
bool IsEH) {
|
||||
MCContext &Context = Streamer.getContext();
|
||||
MCObjectFileInfo *MOFI =
|
||||
const_cast<MCObjectFileInfo*>(Context.getObjectFileInfo());
|
||||
const MCObjectFileInfo *MOFI = Context.getObjectFileInfo();
|
||||
FrameEmitterImpl Emitter(UsingCFI, IsEH);
|
||||
ArrayRef<MCDwarfFrameInfo> FrameArray = Streamer.getFrameInfos();
|
||||
|
||||
@ -1458,8 +1457,9 @@ void MCDwarfFrameEmitter::Emit(MCStreamer &Streamer,
|
||||
}
|
||||
}
|
||||
|
||||
const MCSection &Section = IsEH ? *MOFI->getEHFrameSection() :
|
||||
*MOFI->getDwarfFrameSection();
|
||||
const MCSection &Section =
|
||||
IsEH ? *const_cast<MCObjectFileInfo*>(MOFI)->getEHFrameSection() :
|
||||
*MOFI->getDwarfFrameSection();
|
||||
Streamer.SwitchSection(&Section);
|
||||
MCSymbol *SectionStart = Context.CreateTempSymbol();
|
||||
Streamer.EmitLabel(SectionStart);
|
||||
|
Loading…
Reference in New Issue
Block a user