aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2020-12-04 19:03:40 -0800
committerFangrui Song <i@maskray.me>2020-12-04 19:03:41 -0800
commit961f31d8ad14c66829991522d73e14b5a96ff6d4 (patch)
tree2c6c6c38257eefd2f6d9683c091a89095cb0ce0b /clang/lib/CodeGen/CodeGenModule.cpp
parentfd32639823e4d74eadbca5b0a9610a87d69b25c8 (diff)
downloadllvm-961f31d8ad14c66829991522d73e14b5a96ff6d4.zip
llvm-961f31d8ad14c66829991522d73e14b5a96ff6d4.tar.gz
llvm-961f31d8ad14c66829991522d73e14b5a96ff6d4.tar.bz2
[TargetMachine] Don't imply dso_local on global variable declarations in Reloc::Static model
clang/lib/CodeGen/CodeGenModule sets dso_local on applicable global variables, we don't need to duplicate the work in TargetMachine:shouldAssumeDSOLocal. (Actually the long-term goal (started by r324535) is to remove as much additional implied dso_local in TargetMachine:shouldAssumeDSOLocal as possible.) By not implying dso_local, we will respect dso_local/dso_preemptable specifiers set by the frontend. This allows the proposed -fno-direct-access-external-data option to work with -fno-pic and prevent copy relocations. This patch should be NFC in terms of the Clang behavior because the case we don't set dso_local is a case Clang sets dso_local. However, some tests don't set dso_local on some `external global` and expose some differences. Most tests have been fixed to be more robust in previous commits.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions