[cfe-commits] [PATCH] Fix PR14474.

Alexey Samsonov samsonov at google.com
Mon Dec 3 09:50:27 PST 2012


  Address comments by glider and bkramer.

Hi echristo,

http://llvm-reviews.chandlerc.com/D151

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D151?vs=385&id=404#toc

Files:
  lib/CodeGen/CodeGenModule.cpp
  test/CodeGenObjCXX/pr14474-gline-tables-only.mm

Index: lib/CodeGen/CodeGenModule.cpp
===================================================================
--- lib/CodeGen/CodeGenModule.cpp
+++ lib/CodeGen/CodeGenModule.cpp
@@ -2691,9 +2691,9 @@
     ObjCRuntime->GenerateClass(OMD);
     // Emit global variable debug information.
     if (CGDebugInfo *DI = getModuleDebugInfo())
-      DI->getOrCreateInterfaceType(getContext().getObjCInterfaceType(OMD->getClassInterface()),
-				   OMD->getLocation());
-    
+      if (getCodeGenOpts().getDebugInfo() >= CodeGenOptions::LimitedDebugInfo)
+        DI->getOrCreateInterfaceType(getContext().getObjCInterfaceType(
+            OMD->getClassInterface()), OMD->getLocation());
     break;
   }
   case Decl::ObjCMethod: {
Index: test/CodeGenObjCXX/pr14474-gline-tables-only.mm
===================================================================
--- /dev/null
+++ test/CodeGenObjCXX/pr14474-gline-tables-only.mm
@@ -0,0 +1,25 @@
+// PR 14474
+// RUN: %clang_cc1 -triple i386-apple-macosx10.6.0 -emit-llvm \
+// RUN:   -gline-tables-only -x objective-c++ -o /dev/null %s
+
+typedef signed char BOOL;
+ at class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
+ at protocol NSObject - (BOOL)isEqual:(id)object;
+ at end
+ at protocol NSCoding - (void)encodeWithCoder:(NSCoder *)aCoder;
+ at end 
+ at interface NSObject <NSObject> { }
+ at end    
+ at interface NSResponder : NSObject <NSCoding> { }
+ at end
+ at protocol NSValidatedUserInterfaceItem - (SEL)action;
+ at end
+ at protocol NSUserInterfaceValidations - (BOOL)validateUserInterfaceItem:(id
+<NSValidatedUserInterfaceItem>)anItem;
+ at end
+ at interface NSRunningApplication : NSObject { }
+ at end
+ at interface NSApplication : NSResponder <NSUserInterfaceValidations> { }
+ at end
+ at implementation MockCrApp + (NSApplication*)sharedApplication { }
+ at end
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151.2.patch
Type: text/x-patch
Size: 1786 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121203/de0404c7/attachment.bin>


More information about the cfe-commits mailing list