Synchronize the conditions for producing a .cfi_startproc and a .cfi_endproc.
Fixes PR9787.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130115 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp b/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
index 8dc01e5..d3a4ec5 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
@@ -128,7 +128,7 @@
 void DwarfCFIException::EndFunction() {
   if (!shouldEmitMoves && !shouldEmitTable) return;
 
-  if (shouldEmitMoves)
+  if (shouldEmitMoves || shouldEmitTable)
     Asm->OutStreamer.EmitCFIEndProc();
 
   Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("eh_func_end",