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