diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-08-02 01:34:32 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-08-02 01:34:32 +0000 |
| commit | c16c75ea9bb6aee277e8ca6ace41b3e852ae382e (patch) | |
| tree | 9aee79510bf96a579b8f096a531b0dac8c982711 /llvm/lib/CodeGen | |
| parent | cc5e54e986a18b868d836e62aefbfbdee51e3f90 (diff) | |
| download | bcm5719-llvm-c16c75ea9bb6aee277e8ca6ace41b3e852ae382e.tar.gz bcm5719-llvm-c16c75ea9bb6aee277e8ca6ace41b3e852ae382e.zip | |
move getDwarfExceptionSection from TAI to TLOF and rename it to
getLSDASection() to be more specific. This makes it pretty obvious
that the ELF LSDA section is being specified wrong in PIC mode. We're
probably getting a lot of startup-time relocations to a readonly page,
which is expensive and bad.
Someone who cares about ELF C++ should investigate this.
llvm-svn: 77847
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp index 8eb97af0f94..b051f7138ef 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -20,10 +20,11 @@ #include "llvm/Support/Timer.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetAsmInfo.h" -#include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetFrameInfo.h" +#include "llvm/Target/TargetLoweringObjectFile.h" #include "llvm/Target/TargetOptions.h" +#include "llvm/Target/TargetRegisterInfo.h" #include "llvm/ADT/StringExtras.h" using namespace llvm; @@ -539,10 +540,8 @@ void DwarfException::EmitExceptionTable() { unsigned SizeAlign = (4 - TotalSize) & 3; // Begin the exception table. - //MCSection *LSDASection = TAI->getLSDASection(); - //Asm->SwitchToSection(LSDASection); - - Asm->SwitchToDataSection(TAI->getDwarfExceptionSection()); + const MCSection *LSDASection = Asm->getObjFileLowering().getLSDASection(); + Asm->SwitchToSection(LSDASection); Asm->EmitAlignment(2, 0, 0, false); O << "GCC_except_table" << SubprogramCount << ":\n"; |

