Skip to content

Remove dead flag disable-tsan-inout-instrumentation #27686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions include/swift/Basic/LangOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,6 @@ namespace swift {
/// Enable experimental #assert feature.
bool EnableExperimentalStaticAssert = false;

/// Staging flag for treating inout parameters as Thread Sanitizer
/// accesses.
bool DisableTsanInoutInstrumentation = false;

/// Should we check the target OSs of serialized modules to see that they're
/// new enough?
bool EnableTargetOSChecking = true;
Expand Down
4 changes: 0 additions & 4 deletions include/swift/Option/FrontendOptions.td
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,6 @@ def disable_availability_checking : Flag<["-"],
"disable-availability-checking">,
HelpText<"Disable checking for potentially unavailable APIs">;

def disable_tsan_inout_instrumentation : Flag<["-"],
"disable-tsan-inout-instrumentation">,
HelpText<"Disable treatment of inout parameters as Thread Sanitizer accesses">;

def report_errors_to_debugger : Flag<["-"], "report-errors-to-debugger">,
HelpText<"Deprecated, will be removed in future versions.">;

Expand Down
3 changes: 0 additions & 3 deletions lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.DisableAvailabilityChecking |=
Args.hasArg(OPT_disable_availability_checking);

Opts.DisableTsanInoutInstrumentation |=
Args.hasArg(OPT_disable_tsan_inout_instrumentation);

if (FrontendOpts.InputKind == InputFileKind::SIL)
Opts.DisableAvailabilityChecking = true;

Expand Down
3 changes: 1 addition & 2 deletions lib/SILGen/SILGenLValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3927,8 +3927,7 @@ static ManagedValue drillIntoComponent(SILGenFunction &SGF,
bool isRValue = component.isRValue();
ManagedValue addr = std::move(component).project(SGF, loc, base);

if (!SGF.getASTContext().LangOpts.DisableTsanInoutInstrumentation &&
(SGF.getModule().getOptions().Sanitizers & SanitizerKind::Thread) &&
if ((SGF.getModule().getOptions().Sanitizers & SanitizerKind::Thread) &&
tsanKind == TSanKind::InoutAccess && !isRValue) {
emitTsanInoutAccess(SGF, loc, addr);
}
Expand Down