Skip to content

Commit faf4021

Browse files
committed
[sil-opt] Added debug-diagnostic-names option.
The same option exists for swift-frontend. Until argument parsing gets unified, add the option for the sil-opt tool.
1 parent 1791108 commit faf4021

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/DriverTool/sil_opt_main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,10 @@ struct SILOptOptions {
495495
llvm::cl::opt<bool> BypassResilienceChecks = llvm::cl::opt<bool>(
496496
"bypass-resilience-checks",
497497
llvm::cl::desc("Ignore all checks for module resilience."));
498+
499+
llvm::cl::opt<bool> DebugDiagnosticNames = llvm::cl::opt<bool>(
500+
"debug-diagnostic-names",
501+
llvm::cl::desc("Include diagnostic names when printing"));
498502
};
499503

500504
/// Regular expression corresponding to the value given in one of the
@@ -609,6 +613,8 @@ int sil_opt_main(ArrayRef<const char *> argv, void *MainAddr) {
609613
}
610614
Invocation.getLangOptions().BypassResilienceChecks =
611615
options.BypassResilienceChecks;
616+
Invocation.getDiagnosticOptions().PrintDiagnosticNames =
617+
options.DebugDiagnosticNames;
612618
for (auto &featureName : options.ExperimentalFeatures) {
613619
if (auto feature = getExperimentalFeature(featureName)) {
614620
Invocation.getLangOptions().Features.insert(*feature);

0 commit comments

Comments
 (0)