diff options
author | Charles Davis <cdavis@mines.edu> | 2011-05-27 21:38:47 +0000 |
---|---|---|
committer | Charles Davis <cdavis@mines.edu> | 2011-05-27 21:38:47 +0000 |
commit | 041ec4aadaa87d1c7ce5f146e6b5b666143a74c9 (patch) | |
tree | 017be1d7d0a28a3d287b6ce4dcffbe21aaa41540 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 380b8dad6b35ad71f076c08833ab3b6586f3ae12 (diff) | |
download | bcm5719-llvm-041ec4aadaa87d1c7ce5f146e6b5b666143a74c9.tar.gz bcm5719-llvm-041ec4aadaa87d1c7ce5f146e6b5b666143a74c9.zip |
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
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index e9cfe43e6d4..4e2888ddfc4 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -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) { |