summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/DwarfWriter.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2007-09-11 08:27:17 +0000
committerBill Wendling <isanbard@gmail.com>2007-09-11 08:27:17 +0000
commit2b8fc31df9dbfde8665f9e663549cc6c2777ad98 (patch)
tree58e67133f40782468d0c0733acfcf3706712a313 /llvm/lib/CodeGen/DwarfWriter.cpp
parent887ecdeb0188976be7ab3f56f57494467a9fc785 (diff)
downloadbcm5719-llvm-2b8fc31df9dbfde8665f9e663549cc6c2777ad98.tar.gz
bcm5719-llvm-2b8fc31df9dbfde8665f9e663549cc6c2777ad98.zip
The personality function on Darwin needs a global stub. We then refer to
that global stub instead of doing the ".set" thingy we were doing before. llvm-svn: 41838
Diffstat (limited to 'llvm/lib/CodeGen/DwarfWriter.cpp')
-rw-r--r--llvm/lib/CodeGen/DwarfWriter.cpp29
1 files changed, 9 insertions, 20 deletions
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp
index 073cb4a31a1..2b4b4ce135f 100644
--- a/llvm/lib/CodeGen/DwarfWriter.cpp
+++ b/llvm/lib/CodeGen/DwarfWriter.cpp
@@ -2789,26 +2789,15 @@ private:
if (Personality) {
Asm->EmitULEB128Bytes(7);
Asm->EOL("Augmentation Size");
- Asm->EmitInt8(DW_EH_PE_pcrel | DW_EH_PE_sdata4);
- Asm->EOL("Personality (pcrel sdata4)");
+ Asm->EmitInt8(DW_EH_PE_pcrel | DW_EH_PE_sdata4 | DW_EH_PE_indirect);
+ Asm->EOL("Personality (pcrel sdata4 indirect)");
- if (TAI->needsSet()) {
- O << "\t.set\t";
- PrintLabelName("set", SetCounter);
- O << ",";
- Asm->EmitExternalGlobal((const GlobalVariable *)(Personality));
- O << "-" << TAI->getPCSymbol();
- Asm->EOL("Set Personality");
- PrintRelDirective();
- PrintLabelName("set", SetCounter);
- Asm->EOL("Personality");
- ++SetCounter;
- } else {
- PrintRelDirective();
- Asm->EmitExternalGlobal((const GlobalVariable *)(Personality));
- O << "-" << TAI->getPCSymbol();
- Asm->EOL("Personality");
- }
+ PrintRelDirective();
+ O << TAI->getPersonalityPrefix();
+ Asm->EmitExternalGlobal((const GlobalVariable *)(Personality));
+ O << TAI->getPersonalitySuffix();
+ O << "-" << TAI->getPCSymbol();
+ Asm->EOL("Personality");
Asm->EmitULEB128Bytes(DW_EH_PE_pcrel);
Asm->EOL("LSDA Encoding (pcrel)");
@@ -3297,7 +3286,7 @@ public:
const std::vector<Function *> Personalities = MMI->getPersonalities();
for (unsigned i =0; i < Personalities.size(); ++i)
EmitCommonEHFrame(Personalities[i], i);
-
+
for (std::vector<FunctionEHFrameInfo>::iterator I = EHFrames.begin(),
E = EHFrames.end(); I != E; ++I)
EmitEHFrame(*I);
OpenPOWER on IntegriCloud