Add the suffix to the Win64 EH data sections' names if given. Add a test for

this. XFAIL'd, because the COFF AsmParser can't handle .section yet.

llvm-svn: 132220
This commit is contained in:
Charles Davis
2011-05-27 21:38:47 +00:00
parent 380b8dad6b
commit 041ec4aada
3 changed files with 61 additions and 6 deletions

View File

@@ -1014,6 +1014,28 @@ const MCSection *TargetLoweringObjectFileCOFF::getEHFrameSection() const {
SectionKind::getDataRel());
}
const MCSection *TargetLoweringObjectFileCOFF::getWin64EHFuncTableSection(
StringRef suffix) const {
if (suffix == "")
return PDataSection;
return getContext().getCOFFSection((".pdata"+suffix).str(),
COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
COFF::IMAGE_SCN_MEM_READ |
COFF::IMAGE_SCN_MEM_WRITE,
SectionKind::getDataRel());
}
const MCSection *TargetLoweringObjectFileCOFF::getWin64EHTableSection(
StringRef suffix) const {
if (suffix == "")
return XDataSection;
return getContext().getCOFFSection((".xdata"+suffix).str(),
COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
COFF::IMAGE_SCN_MEM_READ |
COFF::IMAGE_SCN_MEM_WRITE,
SectionKind::getDataRel());
}
static unsigned
getCOFFSectionFlags(SectionKind K) {