diff options
author | Fangrui Song <i@maskray.me> | 2023-10-31 15:41:53 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2023-10-31 15:47:05 -0700 |
commit | 50f69e5f8149a8577ab07f30a8bae49bbb79ff7d (patch) | |
tree | 3d10ac4992ac62da02d5404e7de76bd2a07caae5 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | 7ad9e9dcf518431a8ecedcc06b09df6c799658ef (diff) | |
download | llvm-50f69e5f8149a8577ab07f30a8bae49bbb79ff7d.zip llvm-50f69e5f8149a8577ab07f30a8bae49bbb79ff7d.tar.gz llvm-50f69e5f8149a8577ab07f30a8bae49bbb79ff7d.tar.bz2 |
insertSSPDeclarations: adjust Darwin condition that sets dso_local
This change is for AArch32 and not strictly needed, but it ensures that
we follow the model that direct accesses are only emitted for dso_local
and we do not need TargetMachine::shouldAssumeDSOLocal to force
dso_local for a dso_preemptable variable.
There is no behavior change to the arm/arm64 configurations listed in
commit 5888dee7d04748744743a35d3aef030018bdc275.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 99eadf4..722cefb 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -2019,7 +2019,8 @@ void TargetLoweringBase::insertSSPDeclarations(Module &M) const { if (M.getDirectAccessExternalData() && !TM.getTargetTriple().isWindowsGNUEnvironment() && !TM.getTargetTriple().isOSFreeBSD() && - !TM.getTargetTriple().isOSDarwin()) + (!TM.getTargetTriple().isOSDarwin() || + TM.getRelocationModel() == Reloc::Static)) GV->setDSOLocal(true); } } |