[cfe-commits] r131242 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.cpp test/CodeGenObjC/debug-info-class-extension3.m
Douglas Gregor
dgregor at apple.com
Thu May 12 14:30:39 PDT 2011
Thanks, Devang!
- Doug
On May 12, 2011, at 2:14 PM, Devang Patel wrote:
> 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) {}
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list