diff options
author | Philip Pfaffe <philip.pfaffe@gmail.com> | 2019-02-04 21:02:49 +0000 |
---|---|---|
committer | Philip Pfaffe <philip.pfaffe@gmail.com> | 2019-02-04 21:02:49 +0000 |
commit | 0ee6a933cec492b334f357b97402e97b612dd1ff (patch) | |
tree | 3449a2dfd88e4b4f77913cbf499375e3ae775cae /clang/lib/CodeGen | |
parent | 90d856cd5f4c4bfe415105f6bfc66f05457a334d (diff) | |
download | bcm5719-llvm-0ee6a933cec492b334f357b97402e97b612dd1ff.tar.gz bcm5719-llvm-0ee6a933cec492b334f357b97402e97b612dd1ff.zip |
[NewPM][MSan] Add Options Handling
Summary: This patch enables passing options to msan via the passes pipeline, e.e., -passes=msan<recover;kernel;track-origins=4>.
Reviewers: chandlerc, fedor.sergeev, leonardchan
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57640
llvm-svn: 353090
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index cc704c77986..e020187ba7b 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -279,7 +279,8 @@ static void addGeneralOptsForMemorySanitizer(const PassManagerBuilder &Builder, const CodeGenOptions &CGOpts = BuilderWrapper.getCGOpts(); int TrackOrigins = CGOpts.SanitizeMemoryTrackOrigins; bool Recover = CGOpts.SanitizeRecover.has(SanitizerKind::Memory); - PM.add(createMemorySanitizerLegacyPassPass(TrackOrigins, Recover, CompileKernel)); + PM.add(createMemorySanitizerLegacyPassPass( + MemorySanitizerOptions{TrackOrigins, Recover, CompileKernel})); // MemorySanitizer inserts complex instrumentation that mostly follows // the logic of the original code, but operates on "shadow" values. @@ -1035,7 +1036,7 @@ void EmitAssemblyHelper::EmitAssemblyWithNewPassManager( if (LangOpts.Sanitize.has(SanitizerKind::Memory)) PB.registerOptimizerLastEPCallback( [](FunctionPassManager &FPM, PassBuilder::OptimizationLevel Level) { - FPM.addPass(MemorySanitizerPass()); + FPM.addPass(MemorySanitizerPass({})); }); if (LangOpts.Sanitize.has(SanitizerKind::Thread)) PB.registerOptimizerLastEPCallback( |