aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfException.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-11-19 19:21:09 +0000
committerBill Wendling <isanbard@gmail.com>2009-11-19 19:21:09 +0000
commitfb7634f1c7a804829fc55e3711ba62c8ade818d0 (patch)
tree0e2b0080bc2dacc7f8137d4eee3077e58fa2ef63 /lib/CodeGen/AsmPrinter/DwarfException.cpp
parent5c376ff9f08513686293b26c86b2c116b976d6b9 (diff)
Reverting the EH table patches.
$ svn merge -c -89279 https://llvm.org/svn/llvm-project/llvm/trunk --- Reverse-merging r89279 into '.': U lib/CodeGen/AsmPrinter/DwarfException.cpp U lib/Target/TargetLoweringObjectFile.cpp $ svn merge -c -89270 https://llvm.org/svn/llvm-project/llvm/trunk --- Reverse-merging r89270 into '.': G lib/CodeGen/AsmPrinter/DwarfException.cpp G lib/Target/TargetLoweringObjectFile.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89379 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfException.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfException.cpp35
1 files changed, 6 insertions, 29 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp
index fcdcfd31bc..1c8b8f4647 100644
--- a/lib/CodeGen/AsmPrinter/DwarfException.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp
@@ -727,8 +727,7 @@ void DwarfException::EmitExceptionTable() {
// somewhere. This predicate should be moved to a shared location that is
// in target-independent code.
//
- if ((LSDASection->getKind().isWriteable() &&
- !LSDASection->getKind().isReadOnlyWithRel()) ||
+ if (LSDASection->getKind().isWriteable() ||
Asm->TM.getRelocationModel() == Reloc::Static)
TTypeFormat = dwarf::DW_EH_PE_absptr;
else
@@ -918,36 +917,14 @@ void DwarfException::EmitExceptionTable() {
}
// Emit the Catch TypeInfos.
- const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
- unsigned Index = 1;
-
for (std::vector<GlobalVariable *>::const_reverse_iterator
I = TypeInfos.rbegin(), E = TypeInfos.rend(); I != E; ++I) {
- const GlobalVariable *TI = *I;
-
- if (TI) {
- if (!LSDASection->getKind().isReadOnlyWithRel() &&
- (TTypeFormat == dwarf::DW_EH_PE_absptr ||
- TI->getLinkage() == GlobalValue::InternalLinkage)) {
- // Print out the unadorned name of the type info.
- PrintRelDirective();
- O << Asm->Mang->getMangledName(TI);
- } else {
- bool IsTypeInfoIndirect = false, IsTypeInfoPCRel = false;
- const MCExpr *TypeInfoRef =
- TLOF.getSymbolForDwarfGlobalReference(TI, Asm->Mang, Asm->MMI,
- IsTypeInfoIndirect,
- IsTypeInfoPCRel);
-
- if (!IsTypeInfoPCRel)
- TypeInfoRef = CreateLabelDiff(TypeInfoRef, "typeinforef_addr",
- Index++);
-
- O << MAI->getData32bitsDirective();
- TypeInfoRef->print(O, MAI);
- }
+ const GlobalVariable *GV = *I;
+ PrintRelDirective();
+
+ if (GV) {
+ O << Asm->Mang->getMangledName(GV);
} else {
- PrintRelDirective();
O << "0x0";
}