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) {
1081
1081
error (" --lto-known-safe-vtables=: expected symbol to start with _ZTV, "
1082
1082
" but got " +
1083
1083
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); });
1085
1089
}
1086
1090
1087
1091
ctx.ltoAllVtablesHaveTypeInfos = vtableSymbolsWithNoRTTI.empty ();
Original file line number Diff line number Diff line change 125
125
126
126
;; Index based WPD
127
127
; 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
129
129
; RUN: llvm-dis %t1.o.4.opt.bc -o - | FileCheck %s --check-prefixes=CHECK-COMMON-IR-LABEL,CHECK-IR
130
130
131
131
;; Hybrid WPD
132
132
; 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
134
134
; RUN: llvm-dis %t1_hybrid.o.4.opt.bc -o - | FileCheck %s --check-prefixes=CHECK-COMMON-IR-LABEL,CHECK-IR
135
135
136
136
;; Regular LTO WPD
137
137
; 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
139
139
; RUN: llvm-dis %t8_regular.0.4.opt.bc -o - | FileCheck %s --check-prefixes=CHECK-COMMON-IR-LABEL,CHECK-IR
140
140
141
141
;; 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