diff options
| author | Dale Johannesen <dalej@apple.com> | 2008-03-26 23:31:39 +0000 |
|---|---|---|
| committer | Dale Johannesen <dalej@apple.com> | 2008-03-26 23:31:39 +0000 |
| commit | 87c6ada5de93c7847a30aa091a09e93594b3c332 (patch) | |
| tree | 3a123168ace286809470f0da8b1cb0dbf665776b /llvm/lib/CodeGen/DwarfWriter.cpp | |
| parent | c10c2e339f67df91397d57abbd3fef63b6b02791 (diff) | |
| download | bcm5719-llvm-87c6ada5de93c7847a30aa091a09e93594b3c332.tar.gz bcm5719-llvm-87c6ada5de93c7847a30aa091a09e93594b3c332.zip | |
Fix a bug in Darwin EH: FDE->CIE pointer must
be relocatable. Describe why .set is needed better.
llvm-svn: 48848
Diffstat (limited to 'llvm/lib/CodeGen/DwarfWriter.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/DwarfWriter.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp index dd7ba9cb888..e72ff07a9d7 100644 --- a/llvm/lib/CodeGen/DwarfWriter.cpp +++ b/llvm/lib/CodeGen/DwarfWriter.cpp @@ -925,19 +925,20 @@ public: void EmitSectionOffset(const char* Label, const char* Section, unsigned LabelNumber, unsigned SectionNumber, - bool IsSmall = false, bool isEH = false) { + bool IsSmall = false, bool isEH = false, + bool useSet = true) { bool printAbsolute = false; - if (TAI->needsSet()) { + if (isEH) + printAbsolute = TAI->isAbsoluteEHSectionOffsets(); + else + printAbsolute = TAI->isAbsoluteDebugSectionOffsets(); + + if (TAI->needsSet() && useSet) { O << "\t.set\t"; PrintLabelName("set", SetCounter, Flavor); O << ","; PrintLabelName(Label, LabelNumber); - if (isEH) - printAbsolute = TAI->isAbsoluteEHSectionOffsets(); - else - printAbsolute = TAI->isAbsoluteDebugSectionOffsets(); - if (!printAbsolute) { O << "-"; PrintLabelName(Section, SectionNumber); @@ -953,11 +954,6 @@ public: PrintLabelName(Label, LabelNumber); - if (isEH) - printAbsolute = TAI->isAbsoluteEHSectionOffsets(); - else - printAbsolute = TAI->isAbsoluteDebugSectionOffsets(); - if (!printAbsolute) { O << "-"; PrintLabelName(Section, SectionNumber); @@ -2919,7 +2915,7 @@ private: EmitSectionOffset("eh_frame_begin", "eh_frame_common", EHFrameInfo.Number, EHFrameInfo.PersonalityIndex, - true, true); + true, true, false); Asm->EOL("FDE CIE offset"); EmitReference("eh_func_begin", EHFrameInfo.Number, true); |

