modern objc translation.  objc_getClass() and objc_getMetaClass()
prototypes should both return  `struct objc_class *`.
// rdar://11375495



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156097 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Rewrite/RewriteModernObjC.cpp b/lib/Rewrite/RewriteModernObjC.cpp
index 05883d4..3863d48 100644
--- a/lib/Rewrite/RewriteModernObjC.cpp
+++ b/lib/Rewrite/RewriteModernObjC.cpp
@@ -5727,11 +5727,11 @@
   Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSendSuper_stret(void);\n";
   Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSend_fpret(void);\n";
 
-  Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_getClass";
+  Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *objc_getClass";
   Preamble += "(const char *);\n";
   Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *class_getSuperclass";
   Preamble += "(struct objc_class *);\n";
-  Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_getMetaClass";
+  Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *objc_getMetaClass";
   Preamble += "(const char *);\n";
   Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_throw( struct objc_object *);\n";
   // @synchronized hooks.
diff --git a/test/Rewriter/objc-modern-getclass-proto.mm b/test/Rewriter/objc-modern-getclass-proto.mm
new file mode 100644
index 0000000..9885657
--- /dev/null
+++ b/test/Rewriter/objc-modern-getclass-proto.mm
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -E %s -o %t.mm
+// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %t.mm -o %t-rw.cpp
+// rdar://11375495
+
+@interface I @end
+@implementation I @end
+
+// CHECK: __OBJC_RW_DLLIMPORT struct objc_class *objc_getClass(const char *);
+// CHECK: __OBJC_RW_DLLIMPORT struct objc_class *objc_getMetaClass(const char *);