[llvm-commits] [llvm] r131151 - in /llvm/trunk: lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/CodeGen/AsmPrinter/CMakeLists.txt lib/CodeGen/AsmPrinter/DwarfException.h lib/CodeGen/AsmPrinter/DwarfSjLjException.cpp test/CodeGen/ARM/debug-info-sreg2.ll
Rafael Espindola
rafael.espindola at gmail.com
Tue May 10 14:04:45 PDT 2011
Author: rafael
Date: Tue May 10 16:04:45 2011
New Revision: 131151
URL: http://llvm.org/viewvc/llvm-project?rev=131151&view=rev
Log:
Produce a __debug_frame section on darwin ARM when appropriate.
Removed:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfSjLjException.cpp
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.h
llvm/trunk/test/CodeGen/ARM/debug-info-sreg2.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=131151&r1=131150&r2=131151&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue May 10 16:04:45 2011
@@ -193,8 +193,6 @@
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 @@
}
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;
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt?rev=131151&r1=131150&r2=131151&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt Tue May 10 16:04:45 2011
@@ -8,7 +8,6 @@
DwarfCompileUnit.cpp
DwarfDebug.cpp
DwarfException.cpp
- DwarfSjLjException.cpp
OcamlGCPrinter.cpp
)
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.h?rev=131151&r1=131150&r2=131151&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.h Tue May 10 16:04:45 2011
@@ -174,26 +174,6 @@
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.
Removed: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfSjLjException.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfSjLjException.cpp?rev=131150&view=auto
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfSjLjException.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfSjLjException.cpp (removed)
@@ -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();
-}
Modified: llvm/trunk/test/CodeGen/ARM/debug-info-sreg2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/debug-info-sreg2.ll?rev=131151&r1=131150&r2=131151&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/debug-info-sreg2.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/debug-info-sreg2.ll Tue May 10 16:04:45 2011
@@ -4,8 +4,8 @@
target triple = "thumbv7-apple-macosx10.6.7"
;CHECK: Ldebug_loc0:
-;CHECK-NEXT: .long Ltmp0
-;CHECK-NEXT: .long Ltmp2
+;CHECK-NEXT: .long Ltmp1
+;CHECK-NEXT: .long Ltmp3
;CHECK-NEXT: .short 6 @ Loc expr size
;CHECK-NEXT: .byte 144 @ DW_OP_regx for S register
More information about the llvm-commits
mailing list