[cfe-commits] r116717 - in /cfe/trunk: clang.xcodeproj/project.pbxproj lib/CodeGen/CGDebugInfo.cpp test/CodeGenObjC/debug-info-getter-name.m

Fariborz Jahanian fjahanian at apple.com
Mon Oct 18 10:51:06 PDT 2010


Author: fjahanian
Date: Mon Oct 18 12:51:06 2010
New Revision: 116717

URL: http://llvm.org/viewvc/llvm-project?rev=116717&view=rev
Log:
patch fixes class names missing from method names in debug information for 
synthesized property. // rdar: //8498026

Added:
    cfe/trunk/test/CodeGenObjC/debug-info-getter-name.m
Modified:
    cfe/trunk/clang.xcodeproj/project.pbxproj
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=116717&r1=116716&r2=116717&view=diff
==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Mon Oct 18 12:51:06 2010
@@ -2039,7 +2039,6 @@
 			isa = PBXProject;
 			buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
 			compatibilityVersion = "Xcode 2.4";
-			developmentRegion = English;
 			hasScannedForEncodings = 1;
 			knownRegions = (
 				English,

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=116717&r1=116716&r2=116717&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Oct 18 12:51:06 2010
@@ -102,6 +102,8 @@
   const DeclContext *DC = OMD->getDeclContext();
   if (const ObjCImplementationDecl *OID = dyn_cast<const ObjCImplementationDecl>(DC)) {
      OS << OID->getName();
+  } else if (const ObjCInterfaceDecl *OID = dyn_cast<const ObjCInterfaceDecl>(DC)) {
+      OS << OID->getName();
   } else if (const ObjCCategoryImplDecl *OCD = dyn_cast<const ObjCCategoryImplDecl>(DC)){
       OS << ((NamedDecl *)OCD)->getIdentifier()->getNameStart() << '(' <<
           OCD->getIdentifier()->getNameStart() << ')';

Added: cfe/trunk/test/CodeGenObjC/debug-info-getter-name.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-getter-name.m?rev=116717&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-getter-name.m (added)
+++ cfe/trunk/test/CodeGenObjC/debug-info-getter-name.m Mon Oct 18 12:51:06 2010
@@ -0,0 +1,50 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi2 -S -g %s -o %t
+// RUN: grep "\[InstanceVariablesEverywhereButTheInterface someString\]" %t | count 7
+
+//rdar: //8498026
+
+ at class NSString;
+
+ at interface InstanceVariablesEverywhereButTheInterface 
+ at end
+
+ at interface InstanceVariablesEverywhereButTheInterface()
+{
+  NSString *_someString;
+}
+
+ at property(readonly) NSString *someString;
+ at property(readonly) unsigned long someNumber;
+ at end
+
+ at implementation InstanceVariablesEverywhereButTheInterface
+{
+  unsigned long _someNumber;
+}
+
+ at synthesize someString = _someString, someNumber = _someNumber;
+
+- init {
+  return self;
+}
+ at end
+
+ at interface AutomaticSynthesis 
+{
+  int real_ivar;
+}
+ at property(copy) NSString *someString;
+ at property unsigned long someNumber;
+ at end
+
+ at implementation AutomaticSynthesis
+- init
+{
+  return self;
+}
+ at end
+
+int main()
+{
+  return 0;
+}





More information about the cfe-commits mailing list