[cfe-commits] r131242 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.cpp test/CodeGenObjC/debug-info-class-extension3.m
Devang Patel
dpatel at apple.com
Thu May 12 14:14:54 PDT 2011
Author: dpatel
Date: Thu May 12 16:14:54 2011
New Revision: 131242
URL: http://llvm.org/viewvc/llvm-project?rev=131242&view=rev
Log:
Do not add AT_APPLE_objc_class_extension attribute if @implementation is not seen.
Added:
cfe/trunk/test/CodeGenObjC/debug-info-class-extension3.m
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=131242&r1=131241&r2=131242&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu May 12 16:14:54 2011
@@ -1242,8 +1242,7 @@
uint64_t Align = CGM.getContext().getTypeAlign(Ty);
unsigned Flags = 0;
- if (ID->getFirstClassExtension() ||
- (ID->getImplementation() && !ID->getImplementation()->ivar_empty()))
+ if (ID->getImplementation())
Flags |= llvm::DIDescriptor::FlagObjcClassExtension;
llvm::DIType RealDecl =
Added: cfe/trunk/test/CodeGenObjC/debug-info-class-extension3.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-class-extension3.m?rev=131242&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-class-extension3.m (added)
+++ cfe/trunk/test/CodeGenObjC/debug-info-class-extension3.m Thu May 12 16:14:54 2011
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fobjc-nonfragile-abi -masm-verbose -S -g %s -o - | FileCheck %s
+
+// CHECK-NOT: AT_APPLE_objc_class_extension
+
+ at interface Foo {} @end
+
+ at interface Foo () {
+ int *bar;
+}
+ at end
+
+void bar(Foo *fptr) {}
More information about the cfe-commits
mailing list