summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEli Friedman <efriedma@codeaurora.org>2018-10-31 23:03:58 +0000
committerEli Friedman <efriedma@codeaurora.org>2018-10-31 23:03:58 +0000
commitd548f0a2146bccda23f15d905b96c74d403bb7e3 (patch)
tree0aa31c3d1a9c916a4467516d8f4122d2f48fb2e7 /llvm/lib
parent1979b11ce93259eb8a9194b4b12c839e7ad2469d (diff)
downloadbcm5719-llvm-d548f0a2146bccda23f15d905b96c74d403bb7e3.tar.gz
bcm5719-llvm-d548f0a2146bccda23f15d905b96c74d403bb7e3.zip
[IR] Allow increasing the alignment of dso-local globals.
I think this is the actual important property; the previous visibility check was an approximation. Differential Revision: https://reviews.llvm.org/D53852 llvm-svn: 345790
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/Globals.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Globals.cpp b/llvm/lib/IR/Globals.cpp
index 3f57b1dbfa8..cbd6450a20c 100644
--- a/llvm/lib/IR/Globals.cpp
+++ b/llvm/lib/IR/Globals.cpp
@@ -252,7 +252,7 @@ bool GlobalValue::canIncreaseAlignment() const {
// Conservatively assume ELF if there's no parent pointer.
bool isELF =
(!Parent || Triple(Parent->getTargetTriple()).isOSBinFormatELF());
- if (isELF && hasDefaultVisibility() && !hasLocalLinkage())
+ if (isELF && !isDSOLocal())
return false;
return true;
OpenPOWER on IntegriCloud