[PATCH] D79467: [PDB] Optimize public symbol processing

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 8 16:08:42 PDT 2020


rnk added a comment.

In D79467#2027765 <https://reviews.llvm.org/D79467#2027765>, @aganea wrote:

> In D79467#2027736 <https://reviews.llvm.org/D79467#2027736>, @rnk wrote:
>
> > Speaking of which, @aganea, since you are using clang to compile now, you should try adding `-Xclang -debug-info-kind=constructor` if you haven't already. It greatly reduces the amount of duplicate type info that clang emits.
>
>
> We were discussing about that today. Is there any drawback for doing so?


There could be missing type info. If you use prebuilt third party libraries that were built without debug info, then it is likely that those types will be missing in the final PDB, even if all the type info is exposed in public headers that you compile.

However, this was already an issue with clang's default type info mode. The new flag moves the heuristic from the vtable to constructors, so it could make the situation worse.

You can work around this kind of issue by picking one object to compile with `-fstandalone-debug`, and then put `static_assert(sizeof(DesiredType) >= 0, "require complete type");` in it somewhere. It might be nice to have a better way to say that without adjusting compiler flags, though.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79467/new/

https://reviews.llvm.org/D79467





More information about the llvm-commits mailing list