summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuba Mracek <mracek@apple.com>2017-01-06 22:02:58 +0000
committerKuba Mracek <mracek@apple.com>2017-01-06 22:02:58 +0000
commit316dc70f82a76f184e8048bb820e2996d24bf0ca (patch)
tree68249d7e94f3b162baf5f4abd205e847c83b75f7
parent3caaa36ac545206cb8a7192e5fb92b36e33c0d24 (diff)
downloadbcm5719-llvm-316dc70f82a76f184e8048bb820e2996d24bf0ca.tar.gz
bcm5719-llvm-316dc70f82a76f184e8048bb820e2996d24bf0ca.zip
[asan] Change the visibility of ___asan_globals_registered to hidden
This flag is used to track global registration in Mach-O and it doesn't need to be exported and visible. Differential Revision: https://reviews.llvm.org/D28250 llvm-svn: 291289
-rw-r--r--llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 1d552839877..54bdc9e0772 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -1818,6 +1818,7 @@ bool AddressSanitizerModule::InstrumentGlobals(IRBuilder<> &IRB, Module &M) {
RegisteredFlag = new GlobalVariable(
M, IntptrTy, false, GlobalVariable::CommonLinkage,
ConstantInt::get(IntptrTy, 0), kAsanGlobalsRegisteredFlagName);
+ RegisteredFlag->setVisibility(GlobalVariable::HiddenVisibility);
// Update llvm.compiler.used, adding the new liveness globals. This is
// needed so that during LTO these variables stay alive. The alternative
OpenPOWER on IntegriCloud