File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1081,7 +1081,11 @@ static void ltoValidateAllVtablesHaveTypeInfos(opt::InputArgList &args) {
10811081 error (" --lto-known-safe-vtables=: expected symbol to start with _ZTV, "
10821082 " but got " +
10831083 knownSafeName);
1084- vtableSymbolsWithNoRTTI.remove (knownSafeName);
1084+ Expected<GlobPattern> pat = GlobPattern::create (knownSafeName);
1085+ if (!pat)
1086+ error (" --lto-known-safe-vtables=: " + toString (pat.takeError ()));
1087+ vtableSymbolsWithNoRTTI.remove_if (
1088+ [&](StringRef s) { return pat->match (s); });
10851089 }
10861090
10871091 ctx.ltoAllVtablesHaveTypeInfos = vtableSymbolsWithNoRTTI.empty ();
Original file line number Diff line number Diff line change 125125
126126;; Index based WPD
127127; RUN: ld.lld %t1.o %t2_nortti.o -o %t8_index -save-temps --lto-whole-program-visibility --lto-validate-all-vtables-have-type-infos \
128- ; RUN: --lto-known-safe-vtables=_ZTV6Native -mllvm -pass-remarks=. 2>&1 | FileCheck %s --check-prefix=REMARK
128+ ; RUN: --lto-known-safe-vtables='_ZTV6N*' -mllvm -pass-remarks=. 2>&1 | FileCheck %s --check-prefix=REMARK
129129; RUN: llvm-dis %t1.o.4.opt.bc -o - | FileCheck %s --check-prefixes=CHECK-COMMON-IR-LABEL,CHECK-IR
130130
131131;; Hybrid WPD
132132; RUN: ld.lld %t1_hybrid.o %t2_nortti.o -o %t8_hybrid -save-temps --lto-whole-program-visibility --lto-validate-all-vtables-have-type-infos \
133- ; RUN: --lto-known-safe-vtables=_ZTV6Native -mllvm -pass-remarks=. 2>&1 | FileCheck %s --check-prefix=REMARK
133+ ; RUN: --lto-known-safe-vtables='_ZTV6N*' -mllvm -pass-remarks=. 2>&1 | FileCheck %s --check-prefix=REMARK
134134; RUN: llvm-dis %t1_hybrid.o.4.opt.bc -o - | FileCheck %s --check-prefixes=CHECK-COMMON-IR-LABEL,CHECK-IR
135135
136136;; Regular LTO WPD
137137; RUN: ld.lld %t1_regular.o %t2_nortti.o -o %t8_regular -save-temps --lto-whole-program-visibility --lto-validate-all-vtables-have-type-infos \
138- ; RUN: --lto-known-safe-vtables=_ZTV6Native -mllvm -pass-remarks=. 2>&1 | FileCheck %s --check-prefix=REMARK
138+ ; RUN: --lto-known-safe-vtables='_ZTV6N*' -mllvm -pass-remarks=. 2>&1 | FileCheck %s --check-prefix=REMARK
139139; RUN: llvm-dis %t8_regular.0.4.opt.bc -o - | FileCheck %s --check-prefixes=CHECK-COMMON-IR-LABEL,CHECK-IR
140140
141141;; Only check for definitions of vtables symbols, just having a reference does not allow a type to
You can’t perform that action at this time.
0 commit comments