Skip to content

Commit ad60802

Browse files
committed
[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
1 parent 0c7e044 commit ad60802

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

llvm/lib/IR/Verifier.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,12 +1070,6 @@ void Verifier::visitDICompositeType(const DICompositeType &N) {
10701070
if (auto *Params = N.getRawTemplateParams())
10711071
visitTemplateParams(N, *Params);
10721072

1073-
if (N.getTag() == dwarf::DW_TAG_class_type ||
1074-
N.getTag() == dwarf::DW_TAG_union_type) {
1075-
AssertDI(N.getFile() && !N.getFile()->getFilename().empty(),
1076-
"class/union requires a filename", &N, N.getFile());
1077-
}
1078-
10791073
if (auto *D = N.getRawDiscriminator()) {
10801074
AssertDI(isa<DIDerivedType>(D) && N.getTag() == dwarf::DW_TAG_variant_part,
10811075
"discriminator can only appear on variant part");

0 commit comments

Comments
 (0)