[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:46:25 PDT 2011
On May 12, 2011, at 2:43 PM, jahanian wrote:
>
> On May 12, 2011, at 2:30 PM, Douglas Gregor wrote:
>
>> 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.
>
> What is the reason behind this change?
Well, without @implementation, you're not sure whether you've seen complete class extension or not. See included test case in this commit.
-
Devang
>
> - Fariborz
>
>>>
>>> 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
>>
>> _______________________________________________
>> 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