[WinEH] Create a separate MBB for funclet prologues

Our current emission strategy is to emit the funclet prologue in the
CatchPad's normal destination.  This is problematic because
intra-funclet control flow to the normal destination is not erroneous
and results in us reevaluating the prologue if said control flow is
taken.

Instead, use the CatchPad's location for the funclet prologue.  This
correctly models our desire to have unwind edges evaluate the prologue
but edges to the normal destination result in typical control flow.

Differential Revision: http://reviews.llvm.org/D13424

llvm-svn: 249483
diff --git a/llvm/test/CodeGen/X86/funclet-layout.ll b/llvm/test/CodeGen/X86/funclet-layout.ll
index ffd4b49..053d484 100644
--- a/llvm/test/CodeGen/X86/funclet-layout.ll
+++ b/llvm/test/CodeGen/X86/funclet-layout.ll
@@ -93,13 +93,14 @@
 ; CHECK: # %try.cont.5
 ; CHECK: retq
 
-; The inner catch funclet contains %catch.3
-; CHECK: # %catch.3
-; CHECK: retq
+; The outer catch funclet contains %catch.dispatch
+; CHECK: # %catch.dispatch{{$}}
+; CHECK: callq _CxxThrowException
+; CHECK: # %unreachable
+; CHECK: ud2
 
-; The outer catch funclet contains %catch and %try.cont
-; CHECK: # %catch{{$}}
-; CHECK: # %try.cont{{$}}
+; The inner catch funclet contains %catch.dispatch.1
+; CHECK: # %catch.dispatch.1
 ; CHECK: retq
 
 
@@ -149,13 +150,13 @@
 ; CHECK-NOT: # exit_two
 ; CHECK: ud2
 
-; The catch(int) funclet contains %catch.2
-; CHECK: # %catch.2
+; The catch(...) funclet contains %catch.dispatch
+; CHECK: # %catch.dispatch{{$}}
 ; CHECK: callq exit
 ; CHECK: ud2
 
-; The catch(...) funclet contains %catch
-; CHECK: # %catch{{$}}
+; The catch(int) funclet contains %catch.dispatch.1
+; CHECK: # %catch.dispatch.1
 ; CHECK: callq exit
 ; CHECK: ud2