Merge pull request #27686 from DougGregor/tsan-4-eva

Remove dead flag disable-tsan-inout-instrumentation
This commit is contained in:
Doug Gregor
2019-10-15 16:01:35 -07:00
committed by GitHub
4 changed files with 1 additions and 13 deletions

View File

@@ -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;

View File

@@ -352,10 +352,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.">;

View File

@@ -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;

View File

@@ -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);
}