[PATCH] D59620: [llvm-pdbutil] Add -type-ref-stats to help find unused type info
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 08:54:30 PDT 2019
zturner added a comment.
In D59620#1438019 <https://reviews.llvm.org/D59620#1438019>, @aganea wrote:
> Another question - do you think we could replace forward references by the the concrete ones?
> ie.replace references to 0x100E with 0x1016, and remove 0x100E:
>
> CHECK: 0x100E | LF_STRUCTURE [size = 108, unreferenced] `__vc_attributes::event_sourceAttribute`
> CHECK: unique name: `.?AUevent_sourceAttribute at __vc_attributes@@`
> CHECK: vtable: <no type>, base list: <no type>, field list: <no type>
> CHECK: options: forward ref (-> 0x1016) | has unique name, sizeof 0
>
>
> CHECK: 0x1016 | LF_STRUCTURE [size = 108, unreferenced] `__vc_attributes::event_sourceAttribute`
> CHECK: unique name: `.?AUevent_sourceAttribute at __vc_attributes@@`
> CHECK: vtable: <no type>, base list: <no type>, field list: 0x1015
> CHECK: options: has ctor / dtor | contains nested class | has unique name, sizeof 12
>
I don't think we could replace forward references with the full declarations. Forward references exist to deal with cycles, as well as to make sure the entire type stream can be topologically sorted. Without forward references you wouldn't be able to do this. For example, consider this struct:
struct Node {
Node *n;
};
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59620/new/
https://reviews.llvm.org/D59620
More information about the llvm-commits
mailing list