aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCAsmStreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MC/MCAsmStreamer.cpp')
-rw-r--r--lib/MC/MCAsmStreamer.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp
index 6973bbb..f60c7fc 100644
--- a/lib/MC/MCAsmStreamer.cpp
+++ b/lib/MC/MCAsmStreamer.cpp
@@ -700,7 +700,6 @@ void MCAsmStreamer::EmitULEB128Value(const MCExpr *Value) {
EmitULEB128IntValue(IntValue);
return;
}
- assert(MAI->hasLEB128() && "Cannot print a .uleb");
OS << ".uleb128 " << *Value;
EmitEOL();
}
@@ -711,7 +710,6 @@ void MCAsmStreamer::EmitSLEB128Value(const MCExpr *Value) {
EmitSLEB128IntValue(IntValue);
return;
}
- assert(MAI->hasLEB128() && "Cannot print a .sleb");
OS << ".sleb128 " << *Value;
EmitEOL();
}
@@ -1089,19 +1087,6 @@ void MCAsmStreamer::EmitWinEHHandler(const MCSymbol *Sym, bool Unwind,
EmitEOL();
}
-static const MCSection *getWin64EHTableSection(StringRef suffix,
- MCContext &context) {
- // FIXME: This doesn't belong in MCObjectFileInfo. However,
- /// this duplicate code in MCWin64EH.cpp.
- if (suffix == "")
- return context.getObjectFileInfo()->getXDataSection();
- return context.getCOFFSection((".xdata"+suffix).str(),
- COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
- COFF::IMAGE_SCN_MEM_READ |
- COFF::IMAGE_SCN_MEM_WRITE,
- SectionKind::getDataRel());
-}
-
void MCAsmStreamer::EmitWinEHHandlerData() {
MCStreamer::EmitWinEHHandlerData();
@@ -1109,11 +1094,10 @@ void MCAsmStreamer::EmitWinEHHandlerData() {
// cause the section switch to be visible in the emitted assembly.
// We only do this so the section switch that terminates the handler
// data block is visible.
- MCWin64EHUnwindInfo *CurFrame = getCurrentW64UnwindInfo();
- StringRef suffix=MCWin64EHUnwindEmitter::GetSectionSuffix(CurFrame->Function);
- const MCSection *xdataSect = getWin64EHTableSection(suffix, getContext());
- if (xdataSect)
- SwitchSectionNoChange(xdataSect);
+ WinEH::FrameInfo *CurFrame = getCurrentWinFrameInfo();
+ if (const MCSection *XData = WinEH::UnwindEmitter::getXDataSection(
+ CurFrame->Function, getContext()))
+ SwitchSectionNoChange(XData);
OS << "\t.seh_handlerdata";
EmitEOL();