aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-05-10 21:04:45 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-05-10 21:04:45 +0000
commit6253c7ca60e3e5c9b10743721b921aa34307d625 (patch)
tree0ee18cce07f5681981d16aa44e659c81cb1f6040 /lib/CodeGen
parente3a0e987f3d4f07512cdb64b9034369f966cb448 (diff)
downloadexternal_llvm-6253c7ca60e3e5c9b10743721b921aa34307d625.tar.gz
external_llvm-6253c7ca60e3e5c9b10743721b921aa34307d625.tar.bz2
external_llvm-6253c7ca60e3e5c9b10743721b921aa34307d625.zip
Produce a __debug_frame section on darwin ARM when appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131151 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp12
-rw-r--r--lib/CodeGen/AsmPrinter/CMakeLists.txt1
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfException.h20
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfSjLjException.cpp46
4 files changed, 6 insertions, 73 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 7f39cef3f9..5a91341097 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -193,8 +193,6 @@ bool AsmPrinter::doInitialization(Module &M) {
case ExceptionHandling::None:
return false;
case ExceptionHandling::SjLj:
- DE = new DwarfSjLjException(this);
- return false;
case ExceptionHandling::DwarfCFI:
DE = new DwarfCFIException(this);
return false;
@@ -593,11 +591,13 @@ static bool EmitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) {
}
AsmPrinter::CFIMoveType AsmPrinter::needsCFIMoves() {
- if (UnwindTablesMandatory)
- return CFI_M_EH;
+ if (MAI->getExceptionHandlingType() == ExceptionHandling::DwarfCFI) {
+ if (UnwindTablesMandatory)
+ return CFI_M_EH;
- if (!MF->getFunction()->doesNotThrow())
- return CFI_M_EH;
+ if (!MF->getFunction()->doesNotThrow())
+ return CFI_M_EH;
+ }
if (MMI->hasDebugInfo())
return CFI_M_Debug;
diff --git a/lib/CodeGen/AsmPrinter/CMakeLists.txt b/lib/CodeGen/AsmPrinter/CMakeLists.txt
index bf5ef2878c..554b47c89c 100644
--- a/lib/CodeGen/AsmPrinter/CMakeLists.txt
+++ b/lib/CodeGen/AsmPrinter/CMakeLists.txt
@@ -8,7 +8,6 @@ add_llvm_library(LLVMAsmPrinter
DwarfCompileUnit.cpp
DwarfDebug.cpp
DwarfException.cpp
- DwarfSjLjException.cpp
OcamlGCPrinter.cpp
)
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.h b/lib/CodeGen/AsmPrinter/DwarfException.h
index 68079bb655..42a3658fff 100644
--- a/lib/CodeGen/AsmPrinter/DwarfException.h
+++ b/lib/CodeGen/AsmPrinter/DwarfException.h
@@ -174,26 +174,6 @@ public:
virtual void EndFunction();
};
-class DwarfSjLjException : public DwarfException {
-public:
- //===--------------------------------------------------------------------===//
- // Main entry points.
- //
- DwarfSjLjException(AsmPrinter *A);
- virtual ~DwarfSjLjException();
-
- /// EndModule - Emit all exception information that should come after the
- /// content.
- virtual void EndModule();
-
- /// BeginFunction - Gather pre-function exception information. Assumes being
- /// emitted immediately after the function entry point.
- virtual void BeginFunction(const MachineFunction *MF);
-
- /// EndFunction - Gather and emit post-function exception information.
- virtual void EndFunction();
-};
-
class ARMException : public DwarfException {
/// shouldEmitTable - Per-function flag to indicate if EH tables should
/// be emitted.
diff --git a/lib/CodeGen/AsmPrinter/DwarfSjLjException.cpp b/lib/CodeGen/AsmPrinter/DwarfSjLjException.cpp
deleted file mode 100644
index e8b8824b0b..0000000000
--- a/lib/CodeGen/AsmPrinter/DwarfSjLjException.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//===-- CodeGen/AsmPrinter/DwarfSjLjException.cpp - Dwarf Exception Impl --==//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file is a simple implementation of DwarfException that just produces
-// the exception table for use with SjLj.
-//
-//===----------------------------------------------------------------------===//
-
-#include "DwarfException.h"
-#include "llvm/CodeGen/MachineLocation.h"
-#include "llvm/CodeGen/MachineModuleInfo.h"
-using namespace llvm;
-
-DwarfSjLjException::DwarfSjLjException(AsmPrinter *A) : DwarfException(A) {
-}
-
-DwarfSjLjException::~DwarfSjLjException() {}
-
-/// EndModule - Emit all exception information that should come after the
-/// content.
-void DwarfSjLjException::EndModule() {
-}
-
-/// BeginFunction - Gather pre-function exception information. Assumes it's
-/// being emitted immediately after the function entry point.
-void DwarfSjLjException::BeginFunction(const MachineFunction *MF) {
-}
-
-/// EndFunction - Gather and emit post-function exception information.
-///
-void DwarfSjLjException::EndFunction() {
- // Record if this personality index uses a landing pad.
- bool HasLandingPad = !MMI->getLandingPads().empty();
-
- // Map all labels and get rid of any dead landing pads.
- MMI->TidyLandingPads();
-
- if (HasLandingPad)
- EmitExceptionTable();
-}