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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132220 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Charles Davis
2011-05-27 21:38:47 +00:00
parent 2d6dcb34b7
commit 88c816453f
3 changed files with 61 additions and 6 deletions
@@ -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) {