summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-05-30 18:52:57 +0000
committerBill Wendling <isanbard@gmail.com>2013-05-30 18:52:57 +0000
commita800f955e93bffb2c4a41a0ade00ae71524c1fbc (patch)
treeccb50fc4015c6a674ce0c462de75876bfd49767d
parent75633ba1e7f5f4a38c6488f4a059bf608c1c2675 (diff)
downloadbcm5719-llvm-a800f955e93bffb2c4a41a0ade00ae71524c1fbc.tar.gz
bcm5719-llvm-a800f955e93bffb2c4a41a0ade00ae71524c1fbc.zip
Use the const_cast only where necessary.
llvm-svn: 182950
-rw-r--r--llvm/lib/MC/MCDwarf.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index efe0c46db86..90221a15f00 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud