[PATCH] D94735: CGDebugInfo CreatedLimitedType: Drop file/line for RecordType with invalid location

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 7 09:10:09 PST 2021


dblaikie added a comment.

In D94735#2547370 <https://reviews.llvm.org/D94735#2547370>, @jdoerfert wrote:

> In D94735#2546968 <https://reviews.llvm.org/D94735#2546968>, @dblaikie wrote:
>
>> This patch is about a clang synthesized `struct`. `clang/lib/CodeGen/CGOpenMPRuntime.cpp:3463` has a synthesized `union` (`distinct !DICompositeType(tag: DW_TAG_union_type, name: "kmp_cmplrdata_t", size: 64, elements: <0x62b690>)`, which has no filename/line with this patch). It does not make sense to attach the current filename/line (which can be entirely irrelevant) to the synthesized `union`. @ABataev @jdoerfert ?
>
> There is no meaningful location for this generated type. Unclear if we should use a filename/line to specify that, e.g. "clang_synthesized:0", or allow it without. Either works for me.

I'd vote in favour of having no location - lots of other types have no location (mostly builtin/fundamental types, admittedly) so should generally be fine. *fingers crossed*


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94735



More information about the cfe-commits mailing list