summaryrefslogtreecommitdiffstats
path: root/llvm/test/Linker
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2018-01-11 22:15:05 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2018-01-11 22:15:05 +0000
commite4b0231c63d40408d06ff4c3669ded4b4ecaaa85 (patch)
tree9e89f032c39da53ab74bd3d38a87264e2b5ceaa4 /llvm/test/Linker
parente97654b2f28072ad9123006c05e03efd82852982 (diff)
downloadbcm5719-llvm-e4b0231c63d40408d06ff4c3669ded4b4ecaaa85.tar.gz
bcm5719-llvm-e4b0231c63d40408d06ff4c3669ded4b4ecaaa85.zip
Make internal/private GVs implicitly dso_local.
While updating clang tests for having clang set dso_local I noticed that: - There are *a lot* of tests to update. - Many of the updates are redundant. They are redundant because a GV is "obviously dso_local". This patch starts formalizing that a bit by requiring that internal and private GVs be dso_local too. Since they all are, we don't have to print dso_local to the textual representation, making it a bit more compact and easier to read. llvm-svn: 322317
Diffstat (limited to 'llvm/test/Linker')
-rw-r--r--llvm/test/Linker/funcimport.ll18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/test/Linker/funcimport.ll b/llvm/test/Linker/funcimport.ll
index 9238fc1900e..e0b18f5ee96 100644
--- a/llvm/test/Linker/funcimport.ll
+++ b/llvm/test/Linker/funcimport.ll
@@ -13,12 +13,12 @@
; Ensure statics are promoted/renamed correctly from this file (all but
; constant variable need promotion).
; RUN: llvm-link %t.bc -summary-index=%t3.thinlto.bc -S | FileCheck %s --check-prefix=EXPORTSTATIC
-; EXPORTSTATIC-DAG: @staticvar.llvm.{{.*}} = hidden global
+; EXPORTSTATIC-DAG: @staticvar.llvm.{{.*}} = dso_local hidden global
; Eventually @staticconstvar can be exported as a copy and not promoted
-; EXPORTSTATIC-DAG: @staticconstvar.llvm.0 = hidden unnamed_addr constant
-; EXPORTSTATIC-DAG: @P.llvm.{{.*}} = hidden global void ()* null
-; EXPORTSTATIC-DAG: define hidden i32 @staticfunc.llvm.
-; EXPORTSTATIC-DAG: define hidden void @staticfunc2.llvm.
+; EXPORTSTATIC-DAG: @staticconstvar.llvm.0 = dso_local hidden unnamed_addr constant
+; EXPORTSTATIC-DAG: @P.llvm.{{.*}} = dso_local hidden global void ()* null
+; EXPORTSTATIC-DAG: define dso_local hidden i32 @staticfunc.llvm.
+; EXPORTSTATIC-DAG: define dso_local hidden void @staticfunc2.llvm.
; Ensure that both weak alias to an imported function and strong alias to a
; non-imported function are correctly turned into declarations.
@@ -67,13 +67,13 @@
; Ensure that imported static variable and function references are correctly
; promoted and renamed (including static constant variable).
; RUN: llvm-link %t2.bc -summary-index=%t3.thinlto.bc -import=referencestatics:%t.bc -S | FileCheck %s --check-prefix=IMPORTSTATIC
-; IMPORTSTATIC-DAG: @staticvar.llvm.{{.*}} = external hidden global
+; IMPORTSTATIC-DAG: @staticvar.llvm.{{.*}} = external dso_local hidden global
; Eventually @staticconstvar can be imported as a copy
-; IMPORTSTATIC-DAG: @staticconstvar.llvm.{{.*}} = external hidden unnamed_addr constant
+; IMPORTSTATIC-DAG: @staticconstvar.llvm.{{.*}} = external dso_local hidden unnamed_addr constant
; IMPORTSTATIC-DAG: define available_externally i32 @referencestatics
; IMPORTSTATIC-DAG: %call = call i32 @staticfunc.llvm.
; IMPORTSTATIC-DAG: %0 = load i32, i32* @staticvar.llvm.
-; IMPORTSTATIC-DAG: declare hidden i32 @staticfunc.llvm.
+; IMPORTSTATIC-DAG: declare dso_local hidden i32 @staticfunc.llvm.
; Ensure that imported global (external) function and variable references
; are handled correctly (including referenced variable imported as
@@ -90,7 +90,7 @@
; Ensure that imported static function pointer correctly promoted and renamed.
; RUN: llvm-link %t2.bc -summary-index=%t3.thinlto.bc -import=callfuncptr:%t.bc -S | FileCheck %s --check-prefix=IMPORTFUNCPTR
-; IMPORTFUNCPTR-DAG: @P.llvm.{{.*}} = external hidden global void ()*
+; IMPORTFUNCPTR-DAG: @P.llvm.{{.*}} = external dso_local hidden global void ()*
; IMPORTFUNCPTR-DAG: define available_externally void @callfuncptr
; IMPORTFUNCPTR-DAG: %0 = load void ()*, void ()** @P.llvm.
OpenPOWER on IntegriCloud