aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-04-10 21:42:06 +0000
committerBill Wendling <isanbard@gmail.com>2013-04-10 21:42:06 +0000
commit2d1df6be879105388bf57ecece509a917e27f25d (patch)
treeb0be6596eb30badd4066c36c3fcff56bc1295378 /llvm/lib/MC/MCObjectFileInfo.cpp
parent7c19abeba62b2dac60538cbccca066c646ae5aa5 (diff)
downloadllvm-2d1df6be879105388bf57ecece509a917e27f25d.zip
llvm-2d1df6be879105388bf57ecece509a917e27f25d.tar.gz
llvm-2d1df6be879105388bf57ecece509a917e27f25d.tar.bz2
Track the compact unwind encoding for when we are unable to generate compact unwind information.
Compact unwind has an encoding for when we're not able to generate compact unwind and must generate an EH frame instead. Track that, but still emit that CU encoding. llvm-svn: 179220
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r--llvm/lib/MC/MCObjectFileInfo.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp
index d19e79a..79ebad1 100644
--- a/llvm/lib/MC/MCObjectFileInfo.cpp
+++ b/llvm/lib/MC/MCObjectFileInfo.cpp
@@ -145,12 +145,16 @@ void MCObjectFileInfo::InitMachOMCObjectFileInfo(Triple T) {
LSDASection = Ctx->getMachOSection("__TEXT", "__gcc_except_tab", 0,
SectionKind::getReadOnlyWithRel());
- if (T.isMacOSX() && !T.isMacOSXVersionLT(10, 6))
+ if (T.isMacOSX() && !T.isMacOSXVersionLT(10, 6)) {
CompactUnwindSection =
Ctx->getMachOSection("__LD", "__compact_unwind",
MCSectionMachO::S_ATTR_DEBUG,
SectionKind::getReadOnly());
+ if (T.getArch() == Triple::x86_64 || T.getArch() == Triple::x86)
+ CompactUnwindDwarfEHFrameOnly = 0x04000000;
+ }
+
// Debug Information.
DwarfAccelNamesSection =
Ctx->getMachOSection("__DWARF", "__apple_names",
@@ -629,6 +633,8 @@ void MCObjectFileInfo::InitMCObjectFileInfo(StringRef TT, Reloc::Model relocm,
PersonalityEncoding = LSDAEncoding = FDEEncoding = FDECFIEncoding =
TTypeEncoding = dwarf::DW_EH_PE_absptr;
+ CompactUnwindDwarfEHFrameOnly = 0;
+
EHFrameSection = 0; // Created on demand.
CompactUnwindSection = 0; // Used only by selected targets.
DwarfAccelNamesSection = 0; // Used only by selected targets.