diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-11-19 00:09:14 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-11-19 00:09:14 +0000 |
commit | 01c69374b508bad0ee71cd3c49414a325238e29a (patch) | |
tree | 20607af79db56ecf91bf942bf7885099022996bb /lib | |
parent | b80077aae9fe51af78e6e25e26d09bf8efcd8244 (diff) | |
download | external_llvm-01c69374b508bad0ee71cd3c49414a325238e29a.zip external_llvm-01c69374b508bad0ee71cd3c49414a325238e29a.tar.gz external_llvm-01c69374b508bad0ee71cd3c49414a325238e29a.tar.bz2 |
The "ReadOnlyWithRel" enum seems to apply more to what Darwin does with the EH
exception table than DataRel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfException.cpp | 9 | ||||
-rw-r--r-- | lib/Target/TargetLoweringObjectFile.cpp | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp index 4f6e685..fcdcfd3 100644 --- a/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -728,7 +728,7 @@ void DwarfException::EmitExceptionTable() { // in target-independent code. // if ((LSDASection->getKind().isWriteable() && - !LSDASection->getKind().isDataRel()) || + !LSDASection->getKind().isReadOnlyWithRel()) || Asm->TM.getRelocationModel() == Reloc::Static) TTypeFormat = dwarf::DW_EH_PE_absptr; else @@ -922,11 +922,11 @@ void DwarfException::EmitExceptionTable() { unsigned Index = 1; for (std::vector<GlobalVariable *>::const_reverse_iterator - I = TypeInfos.rbegin(), E = TypeInfos.rend(); I != E; ++I, ++Index) { + I = TypeInfos.rbegin(), E = TypeInfos.rend(); I != E; ++I) { const GlobalVariable *TI = *I; if (TI) { - if (!LSDASection->getKind().isDataRel() && + if (!LSDASection->getKind().isReadOnlyWithRel() && (TTypeFormat == dwarf::DW_EH_PE_absptr || TI->getLinkage() == GlobalValue::InternalLinkage)) { // Print out the unadorned name of the type info. @@ -940,7 +940,8 @@ void DwarfException::EmitExceptionTable() { IsTypeInfoPCRel); if (!IsTypeInfoPCRel) - TypeInfoRef = CreateLabelDiff(TypeInfoRef, "typeinforef_addr", Index); + TypeInfoRef = CreateLabelDiff(TypeInfoRef, "typeinforef_addr", + Index++); O << MAI->getData32bitsDirective(); TypeInfoRef->print(O, MAI); diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp index e36e453..6fdbc92 100644 --- a/lib/Target/TargetLoweringObjectFile.cpp +++ b/lib/Target/TargetLoweringObjectFile.cpp @@ -784,7 +784,7 @@ void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx, // Exception Handling. LSDASection = getMachOSection("__TEXT", "__gcc_except_tab", 0, - SectionKind::getDataRel()); + SectionKind::getReadOnlyWithRel()); EHFrameSection = getMachOSection("__TEXT", "__eh_frame", MCSectionMachO::S_COALESCED | |