diff options
Diffstat (limited to 'contrib/llvm/lib/MC/MCWinEH.cpp')
-rw-r--r-- | contrib/llvm/lib/MC/MCWinEH.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/contrib/llvm/lib/MC/MCWinEH.cpp b/contrib/llvm/lib/MC/MCWinEH.cpp index 47eaf0f..d5d9ead 100644 --- a/contrib/llvm/lib/MC/MCWinEH.cpp +++ b/contrib/llvm/lib/MC/MCWinEH.cpp @@ -11,6 +11,7 @@ #include "llvm/MC/MCContext.h" #include "llvm/MC/MCObjectFileInfo.h" #include "llvm/MC/MCSectionCOFF.h" +#include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSymbol.h" #include "llvm/MC/MCWinEH.h" #include "llvm/Support/COFF.h" @@ -24,9 +25,10 @@ namespace WinEH { /// associated with that comdat. If the code described is not in the main .text /// section, make a new section for it. Otherwise use the main unwind info /// section. -static const MCSection *getUnwindInfoSection( - StringRef SecName, const MCSectionCOFF *UnwindSec, const MCSymbol *Function, - MCContext &Context) { +static MCSection *getUnwindInfoSection(StringRef SecName, + MCSectionCOFF *UnwindSec, + const MCSymbol *Function, + MCContext &Context) { if (Function && Function->isInSection()) { // If Function is in a COMDAT, get or create an unwind info section in that // COMDAT group. @@ -58,16 +60,16 @@ static const MCSection *getUnwindInfoSection( } -const MCSection *UnwindEmitter::getPDataSection(const MCSymbol *Function, - MCContext &Context) { - const MCSectionCOFF *PData = +MCSection *UnwindEmitter::getPDataSection(const MCSymbol *Function, + MCContext &Context) { + MCSectionCOFF *PData = cast<MCSectionCOFF>(Context.getObjectFileInfo()->getPDataSection()); return getUnwindInfoSection(".pdata", PData, Function, Context); } -const MCSection *UnwindEmitter::getXDataSection(const MCSymbol *Function, - MCContext &Context) { - const MCSectionCOFF *XData = +MCSection *UnwindEmitter::getXDataSection(const MCSymbol *Function, + MCContext &Context) { + MCSectionCOFF *XData = cast<MCSectionCOFF>(Context.getObjectFileInfo()->getXDataSection()); return getUnwindInfoSection(".xdata", XData, Function, Context); } |