diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-05-30 18:52:57 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-05-30 18:52:57 +0000 |
commit | 79b40f10c00d38f81272bc683bd94e24607f3897 (patch) | |
tree | b58606ae2ade67d7b1aa74757fb3252f3ec11513 /lib/MC | |
parent | b54d29735af9ddabce268c817ccc2ab3eb54d719 (diff) | |
download | external_llvm-79b40f10c00d38f81272bc683bd94e24607f3897.zip external_llvm-79b40f10c00d38f81272bc683bd94e24607f3897.tar.gz external_llvm-79b40f10c00d38f81272bc683bd94e24607f3897.tar.bz2 |
Use the const_cast only where necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182950 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MCDwarf.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/MC/MCDwarf.cpp b/lib/MC/MCDwarf.cpp index efe0c46..90221a1 100644 --- a/lib/MC/MCDwarf.cpp +++ b/lib/MC/MCDwarf.cpp @@ -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); |