[cfe-commits] r157970 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.cpp test/CodeGenCXX/debug-info-template-member.cpp test/CodeGenCXX/debug-info-user-def.cpp test/CodeGenCXX/debug-lambda-expressions.cpp

Eric Christopher echristo at apple.com
Tue Jun 5 11:01:08 PDT 2012


On Jun 5, 2012, at 12:28 AM, Eric Christopher <echristo at apple.com> wrote:

> 
> On Jun 4, 2012, at 11:12 PM, John McCall wrote:
> 
>> On Jun 4, 2012, at 9:45 PM, John McCall wrote:
>>> On Jun 4, 2012, at 5:15 PM, Eric Christopher wrote:
>>>> Author: echristo
>>>> Date: Mon Jun  4 19:15:06 2012
>>>> New Revision: 157970
>>>> 
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=157970&view=rev
>>>> Log:
>>>> Only emit debug information for methods that are user defined, there's
>>>> not much reason to emit for constructors and destructors that aren't
>>>> user defined.
>>>> 
>>>> rdar://11593099
>>> 
>>> Eric, it looks like this is breaking one of the clang debug info tests:
>>> Clang :: debuginfo-tests___forward-declare-class.cpp
>>> 
>>> http://smooshlab.apple.com:8013/builders/clang-x86_64-darwin10-nobootstrap-RA/builds/633
>> 
>> I reverted in r157983.
> 
> Weird, thanks. I was trying to check the bots this evening but they'd frozen for a while. I'll check why this failed in a bit.

Awesome gdb bug:

0x00000032:     TAG_class_type [4] *
                 AT_name( "A" )
                 AT_byte_size( 0x04 )
                 AT_decl_file( "/Volumes/Data/sources/llvm/tools/clang/test/debuginfo/forward-declare-class.cpp" )
                 AT_decl_line( 18 )

0x0000003a:         TAG_member [5]  
                     AT_name( "MyData" )
                     AT_type( {0x0000002b} ( int ) )
                     AT_decl_file( "/Volumes/Data/sources/llvm/tools/clang/test/debuginfo/forward-declare-class.cpp" )
                     AT_decl_line( 20 )
                     AT_data_member_location( +0 )
                     AT_accessibility( DW_ACCESS_public )

0x00000049:         NULL

yet gdb doesn't believe the tag:

(gdb) ptype A
type = struct A {
    int MyData;
}

because there aren't any methods/constructors in there.

lldb correctly identifies the type:

(lldb) image lookup -t A
1 match found in /Volumes/Data/builds/build-llvm/tools/clang/test/debuginfo/Output/forward-declare-class.cpp.tmp.o:
id = {0x00000032}, name = "A", byte-size = 4, decl = forward-declare-class.cpp:18, clang_type = "class A {
    int MyData;
}"

I'll fix the test to work around this and recommit. Sorry for the noise.

-eric



More information about the cfe-commits mailing list