summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-02-13 18:49:21 +0000
committerReid Kleckner <rnk@google.com>2017-02-13 18:49:21 +0000
commit9de921470dd8531d9ad7b4b0b4f7c3bec6473185 (patch)
tree1d86dbe768daad8bc065a977186cf4bd5a029d21 /clang/lib
parent904c5ed558b8e2eafde445730532bfcae18d613d (diff)
downloadbcm5719-llvm-9de921470dd8531d9ad7b4b0b4f7c3bec6473185.tar.gz
bcm5719-llvm-9de921470dd8531d9ad7b4b0b4f7c3bec6473185.zip
[CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility
Fixes https://bugs.llvm.org/show_bug.cgi?id=31932 Based on a patch by Roland McGrath Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D29843 llvm-svn: 294978
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/ItaniumCXXABI.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp
index 74aabeb253f..6a5fd1916b9 100644
--- a/clang/lib/CodeGen/ItaniumCXXABI.cpp
+++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp
@@ -2162,7 +2162,9 @@ static void emitGlobalDtorWithCXAAtExit(CodeGenFunction &CGF,
// Create a variable that binds the atexit to this shared object.
llvm::Constant *handle =
- CGF.CGM.CreateRuntimeVariable(CGF.Int8Ty, "__dso_handle");
+ CGF.CGM.CreateRuntimeVariable(CGF.Int8Ty, "__dso_handle");
+ auto *GV = cast<llvm::GlobalValue>(handle->stripPointerCasts());
+ GV->setVisibility(llvm::GlobalValue::HiddenVisibility);
llvm::Value *args[] = {
llvm::ConstantExpr::getBitCast(dtor, dtorTy),
OpenPOWER on IntegriCloud