dblaikie added a comment.

In https://reviews.llvm.org/D38061#1271021, @twoh wrote:

> @aprantl It is a debug info. If you compile 
> test/CodeGenCXX/debug-info-anonymous.cpp file with `clang -g2 -emit-llvm -S 
> `, you will find debug metadata something like `distinct !DISubprogram(name: 
> "foo<X::(anonymous enum at 
> /home/twoh/llvms/llvm/tools/clang/test/CodeGenCXX/debug-info-anonymous.cpp:9:3)>",
>  linkageName: "_Z3fooIN1XUt_EEiT_" ...`, which will eventually be included in 
> .debug_info section.


For comparison, GCC names these "foo<X::<anonymous enum> >" - this is somewhat 
of a compatibility problem, since the template function definition's names 
won't match between GCC and Clang, but I guess this is by far not the only 
instance of that. GCC keeps that naming scheme even when it's clearly ambiguous 
(ie: it's not just making a short name when there's no other X::anonymous enum, 
it does it even when there's two of them, etc)


Repository:
  rC Clang

https://reviews.llvm.org/D38061



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to