[llvm-commits] [llvm] r96637 - in /llvm/trunk: include/llvm/CodeGen/TargetLoweringObjectFileImpl.h lib/CodeGen/TargetLoweringObjectFileImpl.cpp lib/Target/X86/X86TargetObjectFile.cpp lib/Target/X86/X86TargetObjectFile.h
Anton Korobeynikov
asl at math.spbu.ru
Thu Feb 18 16:29:36 PST 2010
Author: asl
Date: Thu Feb 18 18:29:36 2010
New Revision: 96637
URL: http://llvm.org/viewvc/llvm-project?rev=96637&view=rev
Log:
Use the same encoding for EH stuff uniformly on all MachO targets.
This hopefulyl should unbreak EH on PPC/Darwin.
Modified:
llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp
llvm/trunk/lib/Target/X86/X86TargetObjectFile.h
Modified: llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h?rev=96637&r1=96636&r2=96637&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h (original)
+++ llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h Thu Feb 18 18:29:36 2010
@@ -171,6 +171,11 @@
virtual const MCExpr *
getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
MachineModuleInfo *MMI, unsigned Encoding) const;
+
+ virtual unsigned getPersonalityEncoding() const;
+ virtual unsigned getLSDAEncoding() const;
+ virtual unsigned getFDEEncoding() const;
+ virtual unsigned getTTypeEncoding() const;
};
Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=96637&r1=96636&r2=96637&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Thu Feb 18 18:29:36 2010
@@ -33,6 +33,7 @@
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
using namespace llvm;
+using namespace dwarf;
//===----------------------------------------------------------------------===//
// ELF
@@ -754,6 +755,22 @@
}
+unsigned TargetLoweringObjectFileMachO::getPersonalityEncoding() const {
+ return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
+}
+
+unsigned TargetLoweringObjectFileMachO::getLSDAEncoding() const {
+ return DW_EH_PE_pcrel;
+}
+
+unsigned TargetLoweringObjectFileMachO::getFDEEncoding() const {
+ return DW_EH_PE_pcrel;
+}
+
+unsigned TargetLoweringObjectFileMachO::getTTypeEncoding() const {
+ return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
+}
+
//===----------------------------------------------------------------------===//
// COFF
//===----------------------------------------------------------------------===//
Modified: llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp?rev=96637&r1=96636&r2=96637&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp Thu Feb 18 18:29:36 2010
@@ -148,35 +148,3 @@
return DW_EH_PE_absptr;
}
-
-unsigned X8632_MachoTargetObjectFile::getPersonalityEncoding() const {
- return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
-}
-
-unsigned X8632_MachoTargetObjectFile::getLSDAEncoding() const {
- return DW_EH_PE_pcrel;
-}
-
-unsigned X8632_MachoTargetObjectFile::getFDEEncoding() const {
- return DW_EH_PE_pcrel;
-}
-
-unsigned X8632_MachoTargetObjectFile::getTTypeEncoding() const {
- return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
-}
-
-unsigned X8664_MachoTargetObjectFile::getPersonalityEncoding() const {
- return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
-}
-
-unsigned X8664_MachoTargetObjectFile::getLSDAEncoding() const {
- return DW_EH_PE_pcrel;
-}
-
-unsigned X8664_MachoTargetObjectFile::getFDEEncoding() const {
- return DW_EH_PE_pcrel;
-}
-
-unsigned X8664_MachoTargetObjectFile::getTTypeEncoding() const {
- return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
-}
Modified: llvm/trunk/lib/Target/X86/X86TargetObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetObjectFile.h?rev=96637&r1=96636&r2=96637&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetObjectFile.h (original)
+++ llvm/trunk/lib/Target/X86/X86TargetObjectFile.h Thu Feb 18 18:29:36 2010
@@ -25,10 +25,6 @@
virtual const MCExpr *
getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
MachineModuleInfo *MMI, unsigned Encoding) const;
- virtual unsigned getPersonalityEncoding() const;
- virtual unsigned getLSDAEncoding() const;
- virtual unsigned getFDEEncoding() const;
- virtual unsigned getTTypeEncoding() const;
};
/// X8664_MachoTargetObjectFile - This TLOF implementation is used for
@@ -39,10 +35,6 @@
virtual const MCExpr *
getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
MachineModuleInfo *MMI, unsigned Encoding) const;
- virtual unsigned getPersonalityEncoding() const;
- virtual unsigned getLSDAEncoding() const;
- virtual unsigned getFDEEncoding() const;
- virtual unsigned getTTypeEncoding() const;
};
class X8632_ELFTargetObjectFile : public TargetLoweringObjectFileELF {
More information about the llvm-commits
mailing list