From 0e70598a5b5797bb2f119f8c39f6f5b3cd904c67 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Fri, 11 Sep 2015 17:34:34 +0000 Subject: [X86] Make sure startproc/endproc are paired We used different conditions to determine if we should emit startproc vs endproc. Use the same condition to ensure that they will always be paired. This fixes PR24374. llvm-svn: 247435 --- llvm/lib/CodeGen/AsmPrinter/WinException.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/WinException.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp index 095315809cb..cd360218f36 100644 --- a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp @@ -172,7 +172,7 @@ void WinException::endFunction(const MachineFunction *MF) { Asm->OutStreamer->PopSection(); } - if (shouldEmitMoves) + if (shouldEmitMoves || shouldEmitPersonality) Asm->OutStreamer->EmitWinCFIEndProc(); } -- cgit v1.2.3