From cf4bb317efb48db2b68aebece255b71624dd5bce Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sat, 25 Aug 2007 00:51:55 +0000 Subject: [PATCH] The personality function might need to be declared as: .set Lset0,___gxx_personality_v0-. .long Lset0 on some targets. Make it so! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41385 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/DwarfWriter.cpp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp index 0ade7a25d5d..19aa6c3b930 100644 --- a/lib/CodeGen/DwarfWriter.cpp +++ b/lib/CodeGen/DwarfWriter.cpp @@ -2803,11 +2803,24 @@ private: Asm->EmitInt8(DW_EH_PE_pcrel | DW_EH_PE_sdata4); Asm->EOL("Personality (pcrel sdata4)"); - O << TAI->getData32bitsDirective(); - Asm->EmitExternalGlobal((const GlobalVariable *)(Personality)); - O << "-" << TAI->getPCSymbol(); - Asm->EOL("Personality"); - + if (TAI->needsSet()) { + O << "\t.set\t"; + PrintLabelName("set", SetCounter); + O << ","; + Asm->EmitExternalGlobal((const GlobalVariable *)(Personality)); + O << "-" << TAI->getPCSymbol(); + Asm->EOL("Set Personality"); + O << TAI->getData32bitsDirective(); + PrintLabelName("set", SetCounter); + Asm->EOL("Personality"); + ++SetCounter; + } else { + O << TAI->getData32bitsDirective(); + Asm->EmitExternalGlobal((const GlobalVariable *)(Personality)); + O << "-" << TAI->getPCSymbol(); + Asm->EOL("Personality"); + } + Asm->EmitULEB128Bytes(DW_EH_PE_pcrel); Asm->EOL("LSDA Encoding (pcrel)"); Asm->EmitULEB128Bytes(DW_EH_PE_pcrel); -- 2.34.1