Use DW_AT_APPLE_objc_class_extension attribute to identify interfaces that represent class extension.
Radar 9423077.

llvm-svn: 131239
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 3c411f4..3519cd1 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1241,9 +1241,14 @@
   uint64_t Size = CGM.getContext().getTypeSize(Ty);
   uint64_t Align = CGM.getContext().getTypeAlign(Ty);
 
+  unsigned Flags = 0;
+  if (ID->getFirstClassExtension() || 
+      (ID->getImplementation() && !ID->getImplementation()->ivar_empty()))
+    Flags |= llvm::DIDescriptor::FlagObjcClassExtension;
+
   llvm::DIType RealDecl =
     DBuilder.createStructType(Unit, ID->getName(), DefUnit,
-                                  Line, Size, Align, 0,
+                                  Line, Size, Align, Flags,
                                   Elements, RuntimeLang);
 
   // Now that we have a real decl for the struct, replace anything using the