Skip to content
This repository was archived by the owner on Dec 20, 2019. It is now read-only.

Commit 7dd8230

Browse files
committed
Emit .fnstart/.fnend directives on arm ELF platforms in the mono EH writer since the ARM backends depends on ARMException doing it, and ARMException is not ran when --disable-gnu-eh-frame is given.
1 parent fc854b8 commit 7dd8230

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/CodeGen/AsmPrinter/MonoException.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ MonoException::~MonoException()
254254
void
255255
MonoException::beginFunction(const MachineFunction *MF)
256256
{
257+
if (DisableGNUEH && Asm->MAI->getExceptionHandlingType() == ExceptionHandling::ARM)
258+
static_cast<ARMTargetStreamer*>(Asm->OutStreamer->getTargetStreamer())->emitFnStart();
257259
EHLabels.clear();
258260
}
259261

@@ -414,6 +416,8 @@ MonoException::endFunction(const MachineFunction *MF)
414416
Frames.push_back(info);
415417
EHLabels.clear();
416418

419+
if (DisableGNUEH && Asm->MAI->getExceptionHandlingType() == ExceptionHandling::ARM)
420+
static_cast<ARMTargetStreamer*>(Asm->OutStreamer->getTargetStreamer())->emitFnEnd();
417421
}
418422

419423
/// EmitMonoLSDA - Mono's version of EmitExceptionTable

0 commit comments

Comments
 (0)