summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-04-27 23:08:15 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-04-27 23:08:15 +0000
commit08704349da5aed388fa8694775593f69fd108070 (patch)
tree0a842ca9aeb780cba932208002c08aef470981b6 /llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
parent29ac7b88584a63fd8a4aa0fea185cf5c5e2321f2 (diff)
downloadbcm5719-llvm-08704349da5aed388fa8694775593f69fd108070.tar.gz
bcm5719-llvm-08704349da5aed388fa8694775593f69fd108070.zip
Rename getPersonalityPICSymbol to getCFIPersonalitySymbol, document it, and
give it a bit more responsibility. Also implement it for MachO. If hacked to use cfi, 32 bit MachO will produce .cfi_personality 155, L___gxx_personality_v0$non_lazy_ptr and 64 bit will produce .cfi_presonality ___gxx_personality_v0 The general idea is that .cfi_personality gets passed the final symbol. It is up to codegen to produce it if using indirect representation (like 32 bit MachO), but it is up to MC to decide which relocations to create. llvm-svn: 130341
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
index 70c0c8a82eb..5b92edeb29b 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
@@ -109,17 +109,8 @@ void DwarfCFIException::BeginFunction(const MachineFunction *MF) {
if (PerEncoding == dwarf::DW_EH_PE_omit || !Per)
return;
- const MCSymbol *Sym;
- switch (PerEncoding & 0x70) {
- default:
- report_fatal_error("We do not support this DWARF encoding yet!");
- case dwarf::DW_EH_PE_absptr:
- Sym = Asm->Mang->getSymbol(Per);
- break;
- case dwarf::DW_EH_PE_pcrel:
- Sym = TLOF.getPersonalityPICSymbol(Per->getName());
- break;
- }
+ const MCSymbol *Sym = TLOF.getCFIPersonalitySymbol(Per, PerEncoding,
+ Asm->Mang, MMI);
Asm->OutStreamer.EmitCFIPersonality(Sym, PerEncoding);
}
OpenPOWER on IntegriCloud