Skip to content

Commit 4c2f529

Browse files
committed
[Frontend] Add a more descriptive error for a TBD validation failure.
1 parent 859d0a7 commit 4c2f529

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

include/swift/AST/DiagnosticsFrontend.def

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ ERROR(symbol_in_ir_not_in_tbd,none,
220220
"symbol '%0' (%1) is in generated IR file, but not in TBD file",
221221
(StringRef, StringRef))
222222

223+
ERROR(tbd_validation_failure,none,
224+
"please file a radar or open a bug on bugs.swift.org with this code, and "
225+
"add -Xfrontend -validate-tbd-against-ir=none to squash the errors", ())
226+
223227
ERROR(redundant_prefix_compilation_flag,none,
224228
"invalid argument '-D%0'; did you provide a redundant '-D' in your build settings?",
225229
(StringRef))

lib/FrontendTool/TBD.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ static bool validateSymbolSet(DiagnosticEngine &diags,
113113
}
114114
}
115115

116+
if (error) {
117+
diags.diagnose(SourceLoc(), diag::tbd_validation_failure);
118+
}
119+
116120
return error;
117121
}
118122

0 commit comments

Comments
 (0)