Obscure code gen bug related to sending  
message to 'super' in a class method declared in
cateogy (darwin specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65709 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index ec11edb..cebaa1e 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/lib/CodeGen/CGObjC.cpp
@@ -89,9 +89,11 @@
   if (isSuperMessage) {
     // super is only valid in an Objective-C method
     const ObjCMethodDecl *OMD = cast<ObjCMethodDecl>(CurFuncDecl);
+    bool isCategoryImpl = isa<ObjCCategoryImplDecl>(OMD->getDeclContext());
     return Runtime.GenerateMessageSendSuper(*this, E->getType(),
                                             E->getSelector(),
                                             OMD->getClassInterface(),
+                                            isCategoryImpl,
                                             Receiver,
                                             isClassMessage,
                                             Args);