@@ -1114,7 +1114,8 @@ static void PrintArg(raw_ostream &OS, const char *Arg, bool Quote) {
1114
1114
static bool ParseSILArgs (SILOptions &Opts, ArgList &Args,
1115
1115
IRGenOptions &IRGenOpts,
1116
1116
FrontendOptions &FEOpts,
1117
- DiagnosticEngine &Diags) {
1117
+ DiagnosticEngine &Diags,
1118
+ const llvm::Triple &Triple) {
1118
1119
using namespace options ;
1119
1120
1120
1121
if (const Arg *A = Args.getLastArg (OPT_sil_inline_threshold)) {
@@ -1228,6 +1229,12 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
1228
1229
BaseName = FEOpts.ModuleName ;
1229
1230
Opts.SILOutputFileNameForDebugging = BaseName.str ();
1230
1231
}
1232
+
1233
+ if (const Arg *A = Args.getLastArg (options::OPT_sanitize_EQ)) {
1234
+ Opts.Sanitize = parseSanitizerArgValues (A, Triple, Diags);
1235
+ IRGenOpts.Sanitize = Opts.Sanitize ;
1236
+ }
1237
+
1231
1238
return false ;
1232
1239
}
1233
1240
@@ -1403,10 +1410,6 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
1403
1410
}
1404
1411
}
1405
1412
1406
- if (const Arg *A = Args.getLastArg (options::OPT_sanitize_EQ)) {
1407
- Opts.Sanitize = parseSanitizerArgValues (A, Triple, Diags);
1408
- }
1409
-
1410
1413
if (const Arg *A = Args.getLastArg (options::OPT_sanitize_coverage_EQ)) {
1411
1414
Opts.SanitizeCoverage =
1412
1415
parseSanitizerCoverageArgValue (A, Triple, Diags, Opts.Sanitize );
@@ -1474,7 +1477,8 @@ bool CompilerInvocation::parseArgs(ArrayRef<const char *> Args,
1474
1477
return true ;
1475
1478
}
1476
1479
1477
- if (ParseSILArgs (SILOpts, ParsedArgs, IRGenOpts, FrontendOpts, Diags)) {
1480
+ if (ParseSILArgs (SILOpts, ParsedArgs, IRGenOpts, FrontendOpts, Diags,
1481
+ LangOpts.Target )) {
1478
1482
return true ;
1479
1483
}
1480
1484
0 commit comments