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 @@ -68,6 +68,13 @@ static cl::opt<bool> ClOutlineInstrumentation(
6868 " ELF size" ),
6969 cl::Hidden, cl::init(false ));
7070
71+
72+ static cl::opt<bool > ClVerifyOutlinedInstrumentation (
73+ " tysan-verify-outlined-instrumentation" ,
74+ cl::desc (" Check types twice with both inlined instrumentation and "
75+ " function calls. This verifies that they behave the same." ),
76+ cl::Hidden, cl::init(false ));
77+
7178STATISTIC (NumInstrumentedAccesses, " Number of instrumented accesses" );
7279
7380namespace {
@@ -954,6 +961,11 @@ PreservedAnalyses TypeSanitizerPass::run(Module &M,
954961 for (Function &F : M) {
955962 const TargetLibraryInfo &TLI = FAM.getResult <TargetLibraryAnalysis>(F);
956963 TySan.sanitizeFunction (F, TLI);
964+ if (ClVerifyOutlinedInstrumentation && ClOutlineInstrumentation) {
965+ ClOutlineInstrumentation = false ;
966+ TySan.sanitizeFunction (F, TLI);
967+ ClOutlineInstrumentation = true ;
968+ }
957969 }
958970
959971 return PreservedAnalyses::none ();
You can’t perform that action at this time.
0 commit comments