fix COFF targets (mingw/cygwin) to provide ehframe and LSDA sections

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79346 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2009-08-18 16:56:17 +00:00
parent 755baa8329
commit 35c3531754
2 changed files with 10 additions and 8 deletions

View File

@@ -56,10 +56,7 @@ void DwarfException::EmitCommonEHFrame(const Function *Personality,
TD->getPointerSize() : -TD->getPointerSize();
// Begin eh frame section.
// FIXME: THIS IS A HORRIBLE HACK. MingW isn't specifying an EHFrame section.
if (const MCSection *EHFrameSec =
Asm->getObjFileLowering().getEHFrameSection())
Asm->SwitchToSection(EHFrameSec);
Asm->SwitchToSection(Asm->getObjFileLowering().getEHFrameSection());
if (TAI->is_EHSymbolPrivate())
O << TAI->getPrivateGlobalPrefix();
@@ -153,10 +150,7 @@ void DwarfException::EmitEHFrame(const FunctionEHFrameInfo &EHFrameInfo) {
const Function *TheFunc = EHFrameInfo.function;
// FIXME: THIS IS A HORRIBLE HACK. MingW isn't specifying an EHFrame section.
if (const MCSection *EHFrameSec =
Asm->getObjFileLowering().getEHFrameSection())
Asm->SwitchToSection(EHFrameSec);
Asm->SwitchToSection(Asm->getObjFileLowering().getEHFrameSection());
// Externally visible entry into the functions eh frame info. If the
// corresponding function is static, this should not be externally visible.