Do not add AT_APPLE_objc_class_extension attribute if @implementation is not seen.

llvm-svn: 131242
This commit is contained in:
Devang Patel 2011-05-12 21:14:54 +00:00
parent 43054e6159
commit 70d77d144b
2 changed files with 13 additions and 2 deletions

View File

@ -1242,8 +1242,7 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
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 =

View File

@ -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
@interface Foo {} @end
@interface Foo () {
int *bar;
}
@end
void bar(Foo *fptr) {}