@@ -1176,6 +1176,17 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
11761176 options::OPT_fno_sanitize_alloc_token_extended, AllocTokenExtended);
11771177 }
11781178
1179+ if (AllAddedKinds & SanitizerKind::Type) {
1180+ TysanOutlineInstrumentation =
1181+ Args.hasFlag (options::OPT_fsanitize_type_outline_instrumentation,
1182+ options::OPT_fno_sanitize_type_outline_instrumentation,
1183+ TysanOutlineInstrumentation);
1184+ TysanVerifyOutlinedInstrumentation =
1185+ Args.hasFlag (options::OPT_fsanitize_type_verify_outlined_instrumentation,
1186+ options::OPT_fno_sanitize_type_verify_outlined_instrumentation,
1187+ TysanVerifyOutlinedInstrumentation);
1188+ }
1189+
11791190 LinkRuntimes = Args.hasFlag (options::OPT_fsanitize_link_runtime,
11801191 options::OPT_fno_sanitize_link_runtime,
11811192 !Args.hasArg (options::OPT_r));
@@ -1500,6 +1511,15 @@ void SanitizerArgs::addArgs(const ToolChain &TC, const llvm::opt::ArgList &Args,
15001511 CmdArgs.push_back (" -asan-instrumentation-with-call-threshold=0" );
15011512 }
15021513
1514+ if (TysanOutlineInstrumentation || TysanVerifyOutlinedInstrumentation) {
1515+ CmdArgs.push_back (" -mllvm" );
1516+ CmdArgs.push_back (" -tysan-outline-instrumentation" );
1517+ }
1518+ if (TysanVerifyOutlinedInstrumentation) {
1519+ CmdArgs.push_back (" -mllvm" );
1520+ CmdArgs.push_back (" -tysan-verify-outlined-instrumentation" );
1521+ }
1522+
15031523 // When emitting Stable ABI instrumentation, force outlining calls and avoid
15041524 // inlining shadow memory poisoning. While this is a big performance burden
15051525 // for now it allows full abstraction from implementation details.
0 commit comments