[PATCH] D29843: [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 13 11:00:58 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL294978: [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility (authored by rnk).
Changed prior to commit:
https://reviews.llvm.org/D29843?vs=88068&id=88229#toc
Repository:
rL LLVM
https://reviews.llvm.org/D29843
Files:
cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
cfe/trunk/test/CodeGenCXX/global-init.cpp
cfe/trunk/test/OpenMP/threadprivate_codegen.cpp
Index: cfe/trunk/test/OpenMP/threadprivate_codegen.cpp
===================================================================
--- cfe/trunk/test/OpenMP/threadprivate_codegen.cpp
+++ cfe/trunk/test/OpenMP/threadprivate_codegen.cpp
@@ -176,7 +176,7 @@
// CHECK-TLS-DAG: [[ST_S4_ST:@.+]] = linkonce_odr thread_local global %struct.S4 zeroinitializer
// CHECK-TLS-DAG: [[ST_S4_ST_GUARD:@_ZGVN2STI2S4E2stE]] = linkonce_odr thread_local global i64 0
// CHECK-TLS-DAG: @__tls_guard = internal thread_local global i8 0
-// CHECK-TLS-DAG: @__dso_handle = external global i8
+// CHECK-TLS-DAG: @__dso_handle = external hidden global i8
// CHECK-TLS-DAG: [[GS1_TLS_INIT:@_ZTHL3gs1]] = internal alias void (), void ()* @__tls_init
// CHECK-TLS-DAG: [[ARR_X_TLS_INIT:@_ZTH5arr_x]] = alias void (), void ()* @__tls_init
Index: cfe/trunk/test/CodeGenCXX/global-init.cpp
===================================================================
--- cfe/trunk/test/CodeGenCXX/global-init.cpp
+++ cfe/trunk/test/CodeGenCXX/global-init.cpp
@@ -15,7 +15,7 @@
struct D { ~D(); };
-// CHECK: @__dso_handle = external global i8
+// CHECK: @__dso_handle = external hidden global i8
// CHECK: @c = global %struct.C zeroinitializer, align 8
// PR6205: The casts should not require global initializers
Index: cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
===================================================================
--- cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
+++ cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
@@ -2162,7 +2162,9 @@
// 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),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29843.88229.patch
Type: text/x-patch
Size: 1950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170213/e70174e0/attachment.bin>
More information about the cfe-commits
mailing list