diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-01-11 22:15:05 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-01-11 22:15:05 +0000 |
| commit | e4b0231c63d40408d06ff4c3669ded4b4ecaaa85 (patch) | |
| tree | 9e89f032c39da53ab74bd3d38a87264e2b5ceaa4 /llvm/test/Transforms/FunctionImport/funcimport.ll | |
| parent | e97654b2f28072ad9123006c05e03efd82852982 (diff) | |
| download | bcm5719-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/Transforms/FunctionImport/funcimport.ll')
| -rw-r--r-- | llvm/test/Transforms/FunctionImport/funcimport.ll | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/Transforms/FunctionImport/funcimport.ll b/llvm/test/Transforms/FunctionImport/funcimport.ll index 4ff51a33b5e..472b20cfafd 100644 --- a/llvm/test/Transforms/FunctionImport/funcimport.ll +++ b/llvm/test/Transforms/FunctionImport/funcimport.ll @@ -55,7 +55,7 @@ declare i32 @referencestatics(...) #1 ; Ensure that the call is to the properly-renamed function. ; INSTLIMDEF-DAG: Import staticfunc ; INSTLIMDEF-DAG: %call = call i32 @staticfunc.llvm. -; INSTLIMDEF-DAG: define available_externally hidden i32 @staticfunc.llvm.{{.*}} !thinlto_src_module !0 { +; INSTLIMDEF-DAG: define available_externally dso_local hidden i32 @staticfunc.llvm.{{.*}} !thinlto_src_module !0 { ; INSTLIMDEF-DAG: Import referenceglobals ; CHECK-DAG: define available_externally i32 @referenceglobals(i32 %i) !thinlto_src_module !0 { @@ -80,7 +80,7 @@ declare void @callfuncptr(...) #1 ; Ensure that all uses of local variable @P which has used in setfuncptr ; and callfuncptr are to the same promoted/renamed global. -; CHECK-DAG: @P.llvm.{{.*}} = external hidden global void ()* +; CHECK-DAG: @P.llvm.{{.*}} = external dso_local hidden global void ()* ; CHECK-DAG: %0 = load void ()*, void ()** @P.llvm. ; CHECK-DAG: store void ()* @staticfunc2.llvm.{{.*}}, void ()** @P.llvm. @@ -99,8 +99,8 @@ declare void @weakfunc(...) #1 declare void @linkoncefunc2(...) #1 ; INSTLIMDEF-DAG: Import funcwithpersonality -; INSTLIMDEF-DAG: define available_externally hidden void @funcwithpersonality.llvm.{{.*}}() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !thinlto_src_module !0 { -; INSTLIM5-DAG: declare hidden void @funcwithpersonality.llvm.{{.*}}() +; INSTLIMDEF-DAG: define available_externally dso_local hidden void @funcwithpersonality.llvm.{{.*}}() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !thinlto_src_module !0 { +; INSTLIM5-DAG: declare dso_local hidden void @funcwithpersonality.llvm.{{.*}}() ; CHECK-DAG: declare void @variadic(...) declare void @variadic(...) |

