[llvm] cd4d244 - [NFC][hwasan] Simplify expression

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 20 19:10:24 PDT 2021


Author: Vitaly Buka
Date: 2021-07-20T19:10:05-07:00
New Revision: cd4d244757eaab164ea472056082e95947fe4b9e

URL: https://github.com/llvm/llvm-project/commit/cd4d244757eaab164ea472056082e95947fe4b9e
DIFF: https://github.com/llvm/llvm-project/commit/cd4d244757eaab164ea472056082e95947fe4b9e.diff

LOG: [NFC][hwasan] Simplify expression

Added: 
    

Modified: 
    llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp

Removed: 
    


################################################################################
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


        


More information about the llvm-commits mailing list