Skip to content

Commit 5e38b2a

Browse files
committed
[NFC][msan] Rename ModuleMemorySanitizerPass
1 parent ac66d87 commit 5e38b2a

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

clang/lib/CodeGen/BackendUtil.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ static void addSanitizers(const Triple &TargetTriple,
639639

640640
MemorySanitizerOptions options(TrackOrigins, Recover, CompileKernel,
641641
CodeGenOpts.SanitizeMemoryParamRetval);
642-
MPM.addPass(ModuleMemorySanitizerPass(options));
642+
MPM.addPass(MemorySanitizerPass(options));
643643
if (Level != OptimizationLevel::O0) {
644644
// MemorySanitizer inserts complex instrumentation that mostly
645645
// follows the logic of the original code, but operates on

llvm/include/llvm/Transforms/Instrumentation/MemorySanitizer.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ struct MemorySanitizerOptions {
4040
/// inserts calls to runtime library functions. If the functions aren't declared
4141
/// yet, the pass inserts the declarations. Otherwise the existing globals are
4242
/// used.
43-
struct ModuleMemorySanitizerPass : public PassInfoMixin<ModuleMemorySanitizerPass> {
44-
ModuleMemorySanitizerPass(MemorySanitizerOptions Options) : Options(Options) {}
43+
struct MemorySanitizerPass : public PassInfoMixin<MemorySanitizerPass> {
44+
MemorySanitizerPass(MemorySanitizerOptions Options) : Options(Options) {}
4545

4646
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
4747
void printPipeline(raw_ostream &OS,

llvm/lib/Passes/PassRegistry.def

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ MODULE_PASS_WITH_PARAMS("asan",
154154
parseASanPassOptions,
155155
"kernel")
156156
MODULE_PASS_WITH_PARAMS("msan",
157-
"ModuleMemorySanitizerPass",
157+
"MemorySanitizerPass",
158158
[](MemorySanitizerOptions Opts) {
159-
return ModuleMemorySanitizerPass(Opts);
159+
return MemorySanitizerPass(Opts);
160160
},
161161
parseMSanPassOptions,
162162
"recover;kernel;eager-checks;track-origins=N")

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,8 @@ MemorySanitizerOptions::MemorySanitizerOptions(int TO, bool R, bool K,
669669
Recover(getOptOrDefault(ClKeepGoing, Kernel || R)),
670670
EagerChecks(getOptOrDefault(ClEagerChecks, EagerChecks)) {}
671671

672-
PreservedAnalyses ModuleMemorySanitizerPass::run(Module &M,
673-
ModuleAnalysisManager &AM) {
672+
PreservedAnalyses MemorySanitizerPass::run(Module &M,
673+
ModuleAnalysisManager &AM) {
674674
bool Modified = false;
675675
if (!Options.Kernel) {
676676
insertModuleCtor(M);
@@ -688,9 +688,9 @@ PreservedAnalyses ModuleMemorySanitizerPass::run(Module &M,
688688
return Modified ? PreservedAnalyses::none() : PreservedAnalyses::all();
689689
}
690690

691-
void ModuleMemorySanitizerPass::printPipeline(
691+
void MemorySanitizerPass::printPipeline(
692692
raw_ostream &OS, function_ref<StringRef(StringRef)> MapClassName2PassName) {
693-
static_cast<PassInfoMixin<ModuleMemorySanitizerPass> *>(this)->printPipeline(
693+
static_cast<PassInfoMixin<MemorySanitizerPass> *>(this)->printPipeline(
694694
OS, MapClassName2PassName);
695695
OS << "<";
696696
if (Options.Recover)

0 commit comments

Comments
 (0)