Reinstate r127112, "Propagate new-style exception spec information to ExtProtoInfo.", this time with the missing header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127118 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExceptionSpec.cpp b/lib/Sema/SemaExceptionSpec.cpp
index 123e185..75ae8c2 100644
--- a/lib/Sema/SemaExceptionSpec.cpp
+++ b/lib/Sema/SemaExceptionSpec.cpp
@@ -129,8 +129,7 @@
        Context.getSourceManager().isInSystemHeader(Old->getLocation())) &&
       Old->isExternC()) {
     FunctionProtoType::ExtProtoInfo EPI = NewProto->getExtProtoInfo();
-    EPI.HasExceptionSpec = true;
-    EPI.HasAnyExceptionSpec = false;
+    EPI.ExceptionSpecType = EST_Dynamic;
     EPI.NumExceptions = 0;
     QualType NewType = Context.getFunctionType(NewProto->getResultType(),
                                                NewProto->arg_type_begin(),
@@ -145,8 +144,9 @@
       = Old->getType()->getAs<FunctionProtoType>();
 
     FunctionProtoType::ExtProtoInfo EPI = NewProto->getExtProtoInfo();
-    EPI.HasExceptionSpec = OldProto->hasExceptionSpec();
-    EPI.HasAnyExceptionSpec = OldProto->hasAnyExceptionSpec();
+    EPI.ExceptionSpecType = OldProto->hasExceptionSpec() ?
+      (OldProto->hasAnyExceptionSpec() ? EST_DynamicAny : EST_Dynamic) :
+      EST_None;
     EPI.NumExceptions = OldProto->getNumExceptions();
     EPI.Exceptions = OldProto->exception_begin();