summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
index e0bdf564df8..55bdda3eb1a 100644
--- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
@@ -737,19 +737,17 @@ bool HWAddressSanitizer::runOnFunction(Function &F) {
void HWAddressSanitizer::ShadowMapping::init(Triple &TargetTriple) {
const bool IsAndroid = TargetTriple.isAndroid();
- const bool IsLinux = TargetTriple.isOSLinux();
- const bool IsX86_64 = TargetTriple.getArch() == Triple::x86_64;
const bool IsAndroidWithIfuncSupport =
IsAndroid && !TargetTriple.isAndroidVersionLT(21);
Scale = kDefaultShadowScale;
- if (ClEnableKhwasan || ClInstrumentWithCalls || IsX86_64)
+ if (ClEnableKhwasan || ClInstrumentWithCalls || !IsAndroidWithIfuncSupport)
Offset = 0;
else
Offset = kDynamicShadowSentinel;
if (ClMappingOffset.getNumOccurrences() > 0)
Offset = ClMappingOffset;
- InGlobal = (IsX86_64 && IsLinux) || IsAndroidWithIfuncSupport;
+ InGlobal = IsAndroidWithIfuncSupport;
}
OpenPOWER on IntegriCloud