llvm.org GIT mirror llvm / f0e7c87
Use the same encoding for EH stuff uniformly on all MachO targets. This hopefulyl should unbreak EH on PPC/Darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96637 91177308-0d34-0410-b5e6-96231b3b80d8 Anton Korobeynikov 10 years ago
4 changed file(s) with 22 addition(s) and 40 deletion(s). Raw diff Collapse all Expand all
170170 virtual const MCExpr *
171171 getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
172172 MachineModuleInfo *MMI, unsigned Encoding) const;
173
174 virtual unsigned getPersonalityEncoding() const;
175 virtual unsigned getLSDAEncoding() const;
176 virtual unsigned getFDEEncoding() const;
177 virtual unsigned getTTypeEncoding() const;
173178 };
174179
175180
3232 #include "llvm/ADT/SmallString.h"
3333 #include "llvm/ADT/StringExtras.h"
3434 using namespace llvm;
35 using namespace dwarf;
3536
3637 //===----------------------------------------------------------------------===//
3738 // ELF
753754 }
754755
755756
757 unsigned TargetLoweringObjectFileMachO::getPersonalityEncoding() const {
758 return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
759 }
760
761 unsigned TargetLoweringObjectFileMachO::getLSDAEncoding() const {
762 return DW_EH_PE_pcrel;
763 }
764
765 unsigned TargetLoweringObjectFileMachO::getFDEEncoding() const {
766 return DW_EH_PE_pcrel;
767 }
768
769 unsigned TargetLoweringObjectFileMachO::getTTypeEncoding() const {
770 return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
771 }
772
756773 //===----------------------------------------------------------------------===//
757774 // COFF
758775 //===----------------------------------------------------------------------===//
147147
148148 return DW_EH_PE_absptr;
149149 }
150
151 unsigned X8632_MachoTargetObjectFile::getPersonalityEncoding() const {
152 return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
153 }
154
155 unsigned X8632_MachoTargetObjectFile::getLSDAEncoding() const {
156 return DW_EH_PE_pcrel;
157 }
158
159 unsigned X8632_MachoTargetObjectFile::getFDEEncoding() const {
160 return DW_EH_PE_pcrel;
161 }
162
163 unsigned X8632_MachoTargetObjectFile::getTTypeEncoding() const {
164 return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
165 }
166
167 unsigned X8664_MachoTargetObjectFile::getPersonalityEncoding() const {
168 return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
169 }
170
171 unsigned X8664_MachoTargetObjectFile::getLSDAEncoding() const {
172 return DW_EH_PE_pcrel;
173 }
174
175 unsigned X8664_MachoTargetObjectFile::getFDEEncoding() const {
176 return DW_EH_PE_pcrel;
177 }
178
179 unsigned X8664_MachoTargetObjectFile::getTTypeEncoding() const {
180 return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
181 }
2424 virtual const MCExpr *
2525 getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
2626 MachineModuleInfo *MMI, unsigned Encoding) const;
27 virtual unsigned getPersonalityEncoding() const;
28 virtual unsigned getLSDAEncoding() const;
29 virtual unsigned getFDEEncoding() const;
30 virtual unsigned getTTypeEncoding() const;
3127 };
3228
3329 /// X8664_MachoTargetObjectFile - This TLOF implementation is used for
3834 virtual const MCExpr *
3935 getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
4036 MachineModuleInfo *MMI, unsigned Encoding) const;
41 virtual unsigned getPersonalityEncoding() const;
42 virtual unsigned getLSDAEncoding() const;
43 virtual unsigned getFDEEncoding() const;
44 virtual unsigned getTTypeEncoding() const;
4537 };
4638
4739 class X8632_ELFTargetObjectFile : public TargetLoweringObjectFileELF {