[llvm] 5e38b2a - [NFC][msan] Rename ModuleMemorySanitizerPass
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 6 20:31:25 PDT 2022
Author: Vitaly Buka
Date: 2022-09-06T20:30:35-07:00
New Revision: 5e38b2a456df6e263a509af60a731cec57310498
URL: https://github.com/llvm/llvm-project/commit/5e38b2a456df6e263a509af60a731cec57310498
DIFF: https://github.com/llvm/llvm-project/commit/5e38b2a456df6e263a509af60a731cec57310498.diff
LOG: [NFC][msan] Rename ModuleMemorySanitizerPass
Added:
Modified:
clang/lib/CodeGen/BackendUtil.cpp
llvm/include/llvm/Transforms/Instrumentation/MemorySanitizer.h
llvm/lib/Passes/PassRegistry.def
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 5b379dc4ac62c..2de7e6d1d0fdc 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -639,7 +639,7 @@ static void addSanitizers(const Triple &TargetTriple,
MemorySanitizerOptions options(TrackOrigins, Recover, CompileKernel,
CodeGenOpts.SanitizeMemoryParamRetval);
- MPM.addPass(ModuleMemorySanitizerPass(options));
+ MPM.addPass(MemorySanitizerPass(options));
if (Level != OptimizationLevel::O0) {
// MemorySanitizer inserts complex instrumentation that mostly
// follows the logic of the original code, but operates on
diff --git a/llvm/include/llvm/Transforms/Instrumentation/MemorySanitizer.h b/llvm/include/llvm/Transforms/Instrumentation/MemorySanitizer.h
index 5883f81946a9d..dc162d52709cc 100644
--- a/llvm/include/llvm/Transforms/Instrumentation/MemorySanitizer.h
+++ b/llvm/include/llvm/Transforms/Instrumentation/MemorySanitizer.h
@@ -40,8 +40,8 @@ struct MemorySanitizerOptions {
/// inserts calls to runtime library functions. If the functions aren't declared
/// yet, the pass inserts the declarations. Otherwise the existing globals are
/// used.
-struct ModuleMemorySanitizerPass : public PassInfoMixin<ModuleMemorySanitizerPass> {
- ModuleMemorySanitizerPass(MemorySanitizerOptions Options) : Options(Options) {}
+struct MemorySanitizerPass : public PassInfoMixin<MemorySanitizerPass> {
+ MemorySanitizerPass(MemorySanitizerOptions Options) : Options(Options) {}
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
void printPipeline(raw_ostream &OS,
diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def
index c8c09f69bf7c0..4a14fc785ba56 100644
--- a/llvm/lib/Passes/PassRegistry.def
+++ b/llvm/lib/Passes/PassRegistry.def
@@ -154,9 +154,9 @@ MODULE_PASS_WITH_PARAMS("asan",
parseASanPassOptions,
"kernel")
MODULE_PASS_WITH_PARAMS("msan",
- "ModuleMemorySanitizerPass",
+ "MemorySanitizerPass",
[](MemorySanitizerOptions Opts) {
- return ModuleMemorySanitizerPass(Opts);
+ return MemorySanitizerPass(Opts);
},
parseMSanPassOptions,
"recover;kernel;eager-checks;track-origins=N")
diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
index f12524b9b79d7..3dc7317d8eb54 100644
--- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -669,8 +669,8 @@ MemorySanitizerOptions::MemorySanitizerOptions(int TO, bool R, bool K,
Recover(getOptOrDefault(ClKeepGoing, Kernel || R)),
EagerChecks(getOptOrDefault(ClEagerChecks, EagerChecks)) {}
-PreservedAnalyses ModuleMemorySanitizerPass::run(Module &M,
- ModuleAnalysisManager &AM) {
+PreservedAnalyses MemorySanitizerPass::run(Module &M,
+ ModuleAnalysisManager &AM) {
bool Modified = false;
if (!Options.Kernel) {
insertModuleCtor(M);
@@ -688,9 +688,9 @@ PreservedAnalyses ModuleMemorySanitizerPass::run(Module &M,
return Modified ? PreservedAnalyses::none() : PreservedAnalyses::all();
}
-void ModuleMemorySanitizerPass::printPipeline(
+void MemorySanitizerPass::printPipeline(
raw_ostream &OS, function_ref<StringRef(StringRef)> MapClassName2PassName) {
- static_cast<PassInfoMixin<ModuleMemorySanitizerPass> *>(this)->printPipeline(
+ static_cast<PassInfoMixin<MemorySanitizerPass> *>(this)->printPipeline(
OS, MapClassName2PassName);
OS << "<";
if (Options.Recover)
More information about the llvm-commits
mailing list