[review request for libcxxabi] fix cxa_demangle.cpp to compile with gcc 4.6

Hi,

I noticed cxa_demangle.cpp was fixed to compile with gcc (4.2) back in r164405 by renaming the class '__lambda' to '__lambda_node'. Unfortunately, it looks like newer GCC versions are even more picky about class names! The build is broken again with gcc 4.6 due to an ICE:

cxa_demangle.cpp:3944:7: internal compiler error: Segmentation fault

Looks like newer versions of GCC crash when "__lambda_node" is used as a class name (in addition to crashing with "__lambda").

Anyways, I am able to work around the error with the attached patch that prepends an underscore; would it be OK to commit it to libcxxabi, and then to lldb soon thereafter? My intention is to make the linux lldb buildbot green.

Thanks,
Dan

gcc46_cxa_demangle_fix.patch (931 Bytes)

Yes, this patch looks fine. Thanks for checking. At the risk of bicycle shedding, what about: __lambda_node_abi? I don't feel strongly about it. Just trying to escape the triple underscore, which I've been know to use in the past and have mixed feelings about. Whichever way you decide, you've got clearance to commit this.

Howard