diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-06-22 23:16:51 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-06-22 23:16:51 +0000 |
commit | f942585daeaaf8ef60501563c37b5ffee27a72a7 (patch) | |
tree | 5010d40c066c30b32057586ce12a655c7eab2a04 | |
parent | 09aff6bcad15f41c427ee6bea897ac1cb19c3aec (diff) | |
download | bcm5719-llvm-f942585daeaaf8ef60501563c37b5ffee27a72a7.tar.gz bcm5719-llvm-f942585daeaaf8ef60501563c37b5ffee27a72a7.zip |
Add a flag that indicates whether a target supports compact unwind info or not.
llvm-svn: 133662
-rw-r--r-- | llvm/include/llvm/Target/TargetLoweringObjectFile.h | 10 | ||||
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 8 | ||||
-rw-r--r-- | llvm/lib/Target/TargetLoweringObjectFile.cpp | 1 |
3 files changed, 15 insertions, 4 deletions
diff --git a/llvm/include/llvm/Target/TargetLoweringObjectFile.h b/llvm/include/llvm/Target/TargetLoweringObjectFile.h index 12ea2a5756e..a3d1f372b43 100644 --- a/llvm/include/llvm/Target/TargetLoweringObjectFile.h +++ b/llvm/include/llvm/Target/TargetLoweringObjectFile.h @@ -107,8 +107,12 @@ protected: /// private linkage, aka an L or .L label) or false if it should be a normal /// non-.globl label. This defaults to true. bool IsFunctionEHFrameSymbolPrivate; + + /// SupportsCompactUnwindInfo - This flag is set to true if the CIE and FDE + /// information should be emitted in a compact form. + bool SupportsCompactUnwindInfo; + public: - MCContext &getContext() const { return *Ctx; } virtual ~TargetLoweringObjectFile(); @@ -126,10 +130,12 @@ public: bool getSupportsWeakOmittedEHFrame() const { return SupportsWeakOmittedEHFrame; } - bool getCommDirectiveSupportsAlignment() const { return CommDirectiveSupportsAlignment; } + bool getSupportsCompactUnwindInfo() const { + return SupportsCompactUnwindInfo; + } const MCSection *getTextSection() const { return TextSection; } const MCSection *getDataSection() const { return DataSection; } diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 3f346a35957..df42b2ca0b5 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -487,8 +487,12 @@ void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx, // .comm doesn't support alignment before Leopard. Triple T(((LLVMTargetMachine&)TM).getTargetTriple()); - if (T.isMacOSX() && T.isMacOSXVersionLT(10, 5)) - CommDirectiveSupportsAlignment = false; + if (T.isMacOSX()) { + if (T.isMacOSXVersionLT(10, 5)) + CommDirectiveSupportsAlignment = false; + if (!T.isMacOSXVersionLT(10, 6)) + SupportsCompactUnwindInfo = true; + } TargetLoweringObjectFile::Initialize(Ctx, TM); diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp index 9f87c071643..130a553e292 100644 --- a/llvm/lib/Target/TargetLoweringObjectFile.cpp +++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp @@ -61,6 +61,7 @@ TargetLoweringObjectFile::TargetLoweringObjectFile() : Ctx(0) { IsFunctionEHFrameSymbolPrivate = true; SupportsWeakOmittedEHFrame = true; + SupportsCompactUnwindInfo = false; } TargetLoweringObjectFile::~TargetLoweringObjectFile() { |