Get exception handling working again on 64 bit
authorDuncan Sands <baldrick@free.fr>
Thu, 8 May 2008 12:33:11 +0000 (12:33 +0000)
committerDuncan Sands <baldrick@free.fr>
Thu, 8 May 2008 12:33:11 +0000 (12:33 +0000)
Darwin.  This is a hack of course, but it does
at least look at the right thing: gotpcrel means
that this is already an offset, so an explicit
offset is not needed (and wrong).  I think this
is good enough for the moment: Anton is working
on something better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50850 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/DwarfWriter.cpp

index 5063d63f06bc7128d9ca6beff02028b4bd98f282..fc7ba6db0464a6f75a46b1456b85c2c38b194224 100644 (file)
@@ -2856,7 +2856,8 @@ private:
       O << TAI->getPersonalityPrefix();
       Asm->EmitExternalGlobal((const GlobalVariable *)(Personality));
       O << TAI->getPersonalitySuffix();
-      O << "-" << TAI->getPCSymbol();
+      if (strcmp(TAI->getPersonalitySuffix(), "+4@GOTPCREL"))
+        O << "-" << TAI->getPCSymbol();
       Asm->EOL("Personality");
 
       Asm->EmitInt8(DW_EH_PE_pcrel | DW_EH_PE_sdata4);