File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
llvm/lib/Transforms/Instrumentation Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,13 @@ static cl::opt<bool> ClOutlineInstrumentation(
6464 " ELF size" ),
6565 cl::Hidden, cl::init(false ));
6666
67+
68+ static cl::opt<bool > ClVerifyOutlinedInstrumentation (
69+ " tysan-verify-outlined-instrumentation" ,
70+ cl::desc (" Check types twice with both inlined instrumentation and "
71+ " function calls. This verifies that they behave the same." ),
72+ cl::Hidden, cl::init(false ));
73+
6774STATISTIC (NumInstrumentedAccesses, " Number of instrumented accesses" );
6875
6976namespace {
@@ -958,6 +965,11 @@ PreservedAnalyses TypeSanitizerPass::run(Module &M,
958965 for (Function &F : M) {
959966 const TargetLibraryInfo &TLI = FAM.getResult <TargetLibraryAnalysis>(F);
960967 TySan.sanitizeFunction (F, TLI);
968+ if (ClVerifyOutlinedInstrumentation && ClOutlineInstrumentation) {
969+ ClOutlineInstrumentation = false ;
970+ TySan.sanitizeFunction (F, TLI);
971+ ClOutlineInstrumentation = true ;
972+ }
961973 }
962974
963975 return PreservedAnalyses::none ();
You can’t perform that action at this time.
0 commit comments