[clang] ee4634f - [NFC][asan] Fix confusing variable name
Vitaly Buka via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 2 16:49:31 PDT 2021
Author: Vitaly Buka
Date: 2021-11-02T16:49:15-07:00
New Revision: ee4634f7feb38982bd90192e3d2866c07db3e065
URL: https://github.com/llvm/llvm-project/commit/ee4634f7feb38982bd90192e3d2866c07db3e065
DIFF: https://github.com/llvm/llvm-project/commit/ee4634f7feb38982bd90192e3d2866c07db3e065.diff
LOG: [NFC][asan] Fix confusing variable name
There is no such thing as ModuleUseAfterScope.
Added:
Modified:
clang/lib/CodeGen/BackendUtil.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 30f81b8ae473..534d98be4344 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -1178,16 +1178,16 @@ static void addSanitizers(const Triple &TargetTriple,
if (LangOpts.Sanitize.has(Mask)) {
bool Recover = CodeGenOpts.SanitizeRecover.has(Mask);
bool UseAfterScope = CodeGenOpts.SanitizeAddressUseAfterScope;
- bool ModuleUseAfterScope = asanUseGlobalsGC(TargetTriple, CodeGenOpts);
+ bool UseGlobalGC = asanUseGlobalsGC(TargetTriple, CodeGenOpts);
bool UseOdrIndicator = CodeGenOpts.SanitizeAddressUseOdrIndicator;
llvm::AsanDtorKind DestructorKind =
CodeGenOpts.getSanitizeAddressDtor();
llvm::AsanDetectStackUseAfterReturnMode UseAfterReturn =
CodeGenOpts.getSanitizeAddressUseAfterReturn();
MPM.addPass(RequireAnalysisPass<ASanGlobalsMetadataAnalysis, Module>());
- MPM.addPass(ModuleAddressSanitizerPass(
- CompileKernel, Recover, ModuleUseAfterScope, UseOdrIndicator,
- DestructorKind));
+ MPM.addPass(ModuleAddressSanitizerPass(CompileKernel, Recover,
+ UseGlobalGC, UseOdrIndicator,
+ DestructorKind));
MPM.addPass(createModuleToFunctionPassAdaptor(AddressSanitizerPass(
{CompileKernel, Recover, UseAfterScope, UseAfterReturn})));
}
More information about the cfe-commits
mailing list