diff options
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 3 | ||||
-rw-r--r-- | clang/test/CodeGenObjC/debug-info-class-extension3.m | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 3519cd1f385..6def71fe546 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -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 = diff --git a/clang/test/CodeGenObjC/debug-info-class-extension3.m b/clang/test/CodeGenObjC/debug-info-class-extension3.m new file mode 100644 index 00000000000..549a2adea12 --- /dev/null +++ b/clang/test/CodeGenObjC/debug-info-class-extension3.m @@ -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) {} |