Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when processing the Decl of a @catch statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57208 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index e288057..0f760ee 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -1552,7 +1552,7 @@
       if (!CatchParam) {
         AllMatched = true;
       } else {
-        VD = cast<VarDecl>(CatchParam->getDecl());
+        VD = cast<VarDecl>(CatchParam->getSolitaryDecl());
         PT = VD->getType()->getAsPointerType();
         
         // catch(id e) always matches.