[cfe-commits] r169138 - in /cfe/trunk: lib/CodeGen/CodeGenModule.cpp test/CodeGenObjCXX/pr14474-gline-tables-only.mm
Alexey Samsonov
samsonov at google.com
Mon Dec 3 10:28:13 PST 2012
Author: samsonov
Date: Mon Dec 3 12:28:12 2012
New Revision: 169138
URL: http://llvm.org/viewvc/llvm-project?rev=169138&view=rev
Log:
Fix PR14474: don't emit debug info for interface types in -gline-tables-only mode.
Added:
cfe/trunk/test/CodeGenObjCXX/pr14474-gline-tables-only.mm
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=169138&r1=169137&r2=169138&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon Dec 3 12:28:12 2012
@@ -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: {
Added: cfe/trunk/test/CodeGenObjCXX/pr14474-gline-tables-only.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/pr14474-gline-tables-only.mm?rev=169138&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/pr14474-gline-tables-only.mm (added)
+++ cfe/trunk/test/CodeGenObjCXX/pr14474-gline-tables-only.mm Mon Dec 3 12:28:12 2012
@@ -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
More information about the cfe-commits
mailing list