X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FMC%2FMCAsmStreamer.cpp;h=fcf39b836fcd8c477d589dc3ffabc6c6a0e629f4;hb=6c0e1e0fa658f4e7466c6787aedce992ece2db55;hp=11d6de846fb60172c44770b8104e4dd94f4aaf80;hpb=2aded1f5c721b21cf105608541687a0de6a36154;p=oota-llvm.git diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index 11d6de846fb..fcf39b836fc 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(); @@ -1110,10 +1095,10 @@ void MCAsmStreamer::EmitWinEHHandlerData() { // We only do this so the section switch that terminates the handler // data block is visible. WinEH::FrameInfo *CurFrame = getCurrentWinFrameInfo(); - StringRef suffix=MCWin64EHUnwindEmitter::GetSectionSuffix(CurFrame->Function); - const MCSection *xdataSect = getWin64EHTableSection(suffix, getContext()); - if (xdataSect) - SwitchSectionNoChange(xdataSect); + StringRef Suffix = WinEH::UnwindEmitter::GetSectionSuffix(CurFrame->Function); + if (const MCSection *XData = + WinEH::UnwindEmitter::GetXDataSection(Suffix, getContext())) + SwitchSectionNoChange(XData); OS << "\t.seh_handlerdata"; EmitEOL();