mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-22 13:29:44 +00:00
MC: remove duplicated code
This removes the duplicate definition of GetXDataSection. This function is available as a static method and is identical to the previous implementation. This just cleans up the unnecessary duplication. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215289 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eb9f113293
commit
7a3264e5d2
@ -1089,19 +1089,6 @@ void MCAsmStreamer::EmitWinEHHandler(const MCSymbol *Sym, bool Unwind,
|
|||||||
EmitEOL();
|
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() {
|
void MCAsmStreamer::EmitWinEHHandlerData() {
|
||||||
MCStreamer::EmitWinEHHandlerData();
|
MCStreamer::EmitWinEHHandlerData();
|
||||||
|
|
||||||
@ -1111,7 +1098,8 @@ void MCAsmStreamer::EmitWinEHHandlerData() {
|
|||||||
// data block is visible.
|
// data block is visible.
|
||||||
WinEH::FrameInfo *CurFrame = getCurrentWinFrameInfo();
|
WinEH::FrameInfo *CurFrame = getCurrentWinFrameInfo();
|
||||||
StringRef Suffix = WinEH::UnwindEmitter::GetSectionSuffix(CurFrame->Function);
|
StringRef Suffix = WinEH::UnwindEmitter::GetSectionSuffix(CurFrame->Function);
|
||||||
if (const MCSection *XData = getWin64EHTableSection(Suffix, getContext()))
|
if (const MCSection *XData =
|
||||||
|
WinEH::UnwindEmitter::GetXDataSection(Suffix, getContext()))
|
||||||
SwitchSectionNoChange(XData);
|
SwitchSectionNoChange(XData);
|
||||||
|
|
||||||
OS << "\t.seh_handlerdata";
|
OS << "\t.seh_handlerdata";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user