[PATCH] D38061: Set AnonymousTagLocations false for ASTContext if column info is expected not to be used

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 22 11:01:34 PDT 2018


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





More information about the cfe-commits mailing list