OSDN Git Service

[Verifier] Allow DW_TAG_class_type/DW_TAG_union_type to have no filename
authorFangrui Song <i@maskray.me>
Mon, 8 Feb 2021 21:31:05 +0000 (13:31 -0800)
committerTom Stellard <tstellar@redhat.com>
Tue, 16 Feb 2021 01:29:44 +0000 (17:29 -0800)
commit23a40f7a595d5f07cb08d1d28987d7b4ca3ed766
treeb940ce8d03584ed58d103bae435f1c1b696df12b
parent6aff13f9b05df8ab2ecebf6479204b17d8d8eed6
[Verifier] Allow DW_TAG_class_type/DW_TAG_union_type to have no filename

`clang/lib/CodeGen/CGOpenMPRuntime.cpp` synthesized union
(`distinct !DICompositeType(tag: DW_TAG_union_type, name: "kmp_cmplrdata_t", size: 64, elements: <0x62b690>)`)
does not have meaningful filename/line number.

D94735 dropped the previously arbitrary and untested filename/line from the union and caused a verifier error here.

This fixes `check-libarcher` failures.

Differential Revision: https://reviews.llvm.org/D96212

(cherry picked from commit ad60802a7187aa39b0374536be3fa176fe3d6256)
llvm/lib/IR/Verifier.cpp