diff --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp index 81c60d7184f74..add89cb5442bc 100644 --- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp @@ -201,7 +201,7 @@ bool shouldUsePageAliases(const Triple &TargetTriple) { } bool shouldInstrumentStack(const Triple &TargetTriple) { - return shouldUsePageAliases(TargetTriple) ? false : ClInstrumentStack; + return !shouldUsePageAliases(TargetTriple) && ClInstrumentStack; #ifdef __GNUC__ // No one should use the option directly. #pragma GCC poison ClInstrumentStack