aeubanks created this revision. aeubanks added reviewers: ychen, leonardchan, asbirlea. Herald added a project: clang. Herald added a subscriber: cfe-commits. aeubanks requested review of this revision.
14/16 check-dfsan tests failed with NPM enabled, now all pass. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D91385 Files: clang/lib/CodeGen/BackendUtil.cpp Index: clang/lib/CodeGen/BackendUtil.cpp =================================================================== --- clang/lib/CodeGen/BackendUtil.cpp +++ clang/lib/CodeGen/BackendUtil.cpp @@ -65,6 +65,7 @@ #include "llvm/Transforms/Instrumentation.h" #include "llvm/Transforms/Instrumentation/AddressSanitizer.h" #include "llvm/Transforms/Instrumentation/BoundsChecking.h" +#include "llvm/Transforms/Instrumentation/DataFlowSanitizer.h" #include "llvm/Transforms/Instrumentation/GCOVProfiler.h" #include "llvm/Transforms/Instrumentation/HWAddressSanitizer.h" #include "llvm/Transforms/Instrumentation/InstrProfiling.h" @@ -1295,6 +1296,14 @@ HWASanPass(SanitizerKind::HWAddress, false); HWASanPass(SanitizerKind::KernelHWAddress, true); + if (LangOpts.Sanitize.has(SanitizerKind::DataFlow)) { + PB.registerOptimizerLastEPCallback( + [this](ModulePassManager &MPM, PassBuilder::OptimizationLevel Level) { + MPM.addPass( + DataFlowSanitizerPass(LangOpts.SanitizerBlacklistFiles)); + }); + } + if (Optional<GCOVOptions> Options = getGCOVOptions(CodeGenOpts, LangOpts)) PB.registerPipelineStartEPCallback( [Options](ModulePassManager &MPM,
Index: clang/lib/CodeGen/BackendUtil.cpp =================================================================== --- clang/lib/CodeGen/BackendUtil.cpp +++ clang/lib/CodeGen/BackendUtil.cpp @@ -65,6 +65,7 @@ #include "llvm/Transforms/Instrumentation.h" #include "llvm/Transforms/Instrumentation/AddressSanitizer.h" #include "llvm/Transforms/Instrumentation/BoundsChecking.h" +#include "llvm/Transforms/Instrumentation/DataFlowSanitizer.h" #include "llvm/Transforms/Instrumentation/GCOVProfiler.h" #include "llvm/Transforms/Instrumentation/HWAddressSanitizer.h" #include "llvm/Transforms/Instrumentation/InstrProfiling.h" @@ -1295,6 +1296,14 @@ HWASanPass(SanitizerKind::HWAddress, false); HWASanPass(SanitizerKind::KernelHWAddress, true); + if (LangOpts.Sanitize.has(SanitizerKind::DataFlow)) { + PB.registerOptimizerLastEPCallback( + [this](ModulePassManager &MPM, PassBuilder::OptimizationLevel Level) { + MPM.addPass( + DataFlowSanitizerPass(LangOpts.SanitizerBlacklistFiles)); + }); + } + if (Optional<GCOVOptions> Options = getGCOVOptions(CodeGenOpts, LangOpts)) PB.registerPipelineStartEPCallback( [Options](ModulePassManager &MPM,
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits