[llvm-commits] [llvm] r79323 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
Chris Lattner
sabre at nondot.org
Mon Aug 17 23:13:03 PDT 2009
Author: lattner
Date: Tue Aug 18 01:13:03 2009
New Revision: 79323
URL: http://llvm.org/viewvc/llvm-project?rev=79323&view=rev
Log:
add a horrible hack to the dwarf printer. It looks like mingw is not specifying
an EHFrame section, so we just emit ehframe data into a random section.
This is clearly bad.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp?rev=79323&r1=79322&r2=79323&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Tue Aug 18 01:13:03 2009
@@ -56,7 +56,10 @@
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();
@@ -150,8 +153,11 @@
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())
More information about the llvm-commits
mailing list