diff options
20 files changed, 70 insertions, 61 deletions
diff --git a/llvm/include/llvm/IR/GlobalValue.h b/llvm/include/llvm/IR/GlobalValue.h index 1d8025d4a9b..116b54e0d0f 100644 --- a/llvm/include/llvm/IR/GlobalValue.h +++ b/llvm/include/llvm/IR/GlobalValue.h @@ -233,6 +233,8 @@ public: assert((!hasLocalLinkage() || V == DefaultVisibility) && "local linkage requires default visibility"); Visibility = V; + if (!hasExternalWeakLinkage() && V != DefaultVisibility) + setDSOLocal(true); } /// If the value is "Thread Local", its value isn't shared by the threads. diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index 27a75927832..7c647605894 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -2499,8 +2499,11 @@ static void PrintVisibility(GlobalValue::VisibilityTypes Vis, static void PrintDSOLocation(const GlobalValue &GV, formatted_raw_ostream &Out) { - // GVs with local linkage are implicitly dso_local, so we don't print it. - if (GV.isDSOLocal() && !GV.hasLocalLinkage()) + // GVs with local linkage or non default visibility are implicitly dso_local, + // so we don't print it. + bool Implicit = GV.hasLocalLinkage() || + (!GV.hasExternalWeakLinkage() && !GV.hasDefaultVisibility()); + if (GV.isDSOLocal() && !Implicit) Out << "dso_local "; } diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 42fec7e3d98..f7775be6961 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -575,6 +575,10 @@ void Verifier::visitGlobalValue(const GlobalValue &GV) { "GlobalValue with private or internal linkage must be dso_local!", &GV); + if (!GV.hasDefaultVisibility() && !GV.hasExternalWeakLinkage()) + Assert(GV.isDSOLocal(), + "GlobalValue with non default visibility must be dso_local!", &GV); + forEachUser(&GV, GlobalValueVisited, [&](const Value *V) -> bool { if (const Instruction *I = dyn_cast<Instruction>(V)) { if (!I->getParent() || !I->getParent()->getParent()) diff --git a/llvm/test/Bitcode/dso_location.ll b/llvm/test/Bitcode/dso_location.ll index 4dc9fe24c19..3ad511bad43 100644 --- a/llvm/test/Bitcode/dso_location.ll +++ b/llvm/test/Bitcode/dso_location.ll @@ -15,11 +15,11 @@ @default_local_global = dso_local default global i32 0 ; CHECK: @default_local_global = dso_local global i32 0 -@hidden_local_global = dso_local hidden global i32 0 -; CHECK: @hidden_local_global = dso_local hidden global i32 0 +@hidden_local_global = hidden global i32 0 +; CHECK: @hidden_local_global = hidden global i32 0 -@protected_local_global = dso_local protected global i32 0 -; CHECK: @protected_local_global = dso_local protected global i32 0 +@protected_local_global = protected global i32 0 +; CHECK: @protected_local_global = protected global i32 0 @local_alias = dso_local alias i32, i32* @local_global ; CHECK-DAG: @local_alias = dso_local alias i32, i32* @local_global @@ -32,11 +32,11 @@ declare dso_local default void @default_local() ; CHECK: declare dso_local void @default_local() -declare dso_local hidden void @hidden_local() -; CHECK: declare dso_local hidden void @hidden_local() +declare hidden void @hidden_local() +; CHECK: declare hidden void @hidden_local() -define dso_local protected void @protected_local() { -; CHECK: define dso_local protected void @protected_local() +define protected void @protected_local() { +; CHECK: define protected void @protected_local() entry: ret void } diff --git a/llvm/test/Linker/funcimport.ll b/llvm/test/Linker/funcimport.ll index e0b18f5ee96..9238fc1900e 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.{{.*}} = dso_local hidden global +; EXPORTSTATIC-DAG: @staticvar.llvm.{{.*}} = hidden global ; Eventually @staticconstvar can be exported as a copy and not promoted -; 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. +; 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. ; 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 dso_local hidden global +; IMPORTSTATIC-DAG: @staticvar.llvm.{{.*}} = external hidden global ; Eventually @staticconstvar can be imported as a copy -; IMPORTSTATIC-DAG: @staticconstvar.llvm.{{.*}} = external dso_local hidden unnamed_addr constant +; IMPORTSTATIC-DAG: @staticconstvar.llvm.{{.*}} = external 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 dso_local hidden i32 @staticfunc.llvm. +; IMPORTSTATIC-DAG: declare 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 dso_local hidden global void ()* +; IMPORTFUNCPTR-DAG: @P.llvm.{{.*}} = external hidden global void ()* ; IMPORTFUNCPTR-DAG: define available_externally void @callfuncptr ; IMPORTFUNCPTR-DAG: %0 = load void ()*, void ()** @P.llvm. diff --git a/llvm/test/Other/extract.ll b/llvm/test/Other/extract.ll index 076a4512e44..08675d8bff3 100644 --- a/llvm/test/Other/extract.ll +++ b/llvm/test/Other/extract.ll @@ -7,13 +7,13 @@ ; llvm-extract uses lazy bitcode loading, so make sure it correctly reads ; from bitcode files in addition to assembly files. -; CHECK: define dso_local hidden void @foo() comdat($x) { +; CHECK: define hidden void @foo() comdat($x) { ; CHECK: ret void ; CHECK: } ; The private linkage for foo() should be changed to external linkage and ; hidden visibility added. -; DELETE: declare dso_local hidden void @foo() +; DELETE: declare hidden void @foo() ; DELETE-NOT: comdat ; DELETE: define void @bar() { ; DELETE: call void @foo() diff --git a/llvm/test/ThinLTO/X86/export.ll b/llvm/test/ThinLTO/X86/export.ll index 19aac1ce394..cb87ddd063e 100644 --- a/llvm/test/ThinLTO/X86/export.ll +++ b/llvm/test/ThinLTO/X86/export.ll @@ -5,8 +5,8 @@ ; Ensure statics are promoted/renamed correctly from this file. ; RUN: llvm-lto -thinlto-action=promote %t1.bc -thinlto-index=%t3.bc -o - | llvm-dis -o - | FileCheck %s -; CHECK-DAG: @staticvar.llvm.0 = dso_local hidden global -; CHECK-DAG: define dso_local hidden void @staticfunc.llvm.0 +; CHECK-DAG: @staticvar.llvm.0 = hidden global +; CHECK-DAG: define hidden void @staticfunc.llvm.0 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.11.0" diff --git a/llvm/test/ThinLTO/X86/funcimport.ll b/llvm/test/ThinLTO/X86/funcimport.ll index 1d853eeaa8c..1e8784d7cac 100644 --- a/llvm/test/ThinLTO/X86/funcimport.ll +++ b/llvm/test/ThinLTO/X86/funcimport.ll @@ -9,12 +9,12 @@ ; Ensure statics are promoted/renamed correctly from this file (all but ; constant variable need promotion). ; RUN: llvm-lto -thinlto-action=promote %t.bc -thinlto-index=%t3.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=EXPORTSTATIC -; EXPORTSTATIC-DAG: @staticvar.llvm.0 = dso_local hidden global +; EXPORTSTATIC-DAG: @staticvar.llvm.0 = hidden global ; Eventually @staticconstvar can be exported as a copy and not promoted -; EXPORTSTATIC-DAG: @staticconstvar.llvm.0 = dso_local hidden unnamed_addr constant -; EXPORTSTATIC-DAG: @P.llvm.0 = dso_local hidden global void ()* null -; EXPORTSTATIC-DAG: define dso_local hidden i32 @staticfunc.llvm.0 -; EXPORTSTATIC-DAG: define dso_local hidden void @staticfunc2.llvm.0 +; EXPORTSTATIC-DAG: @staticconstvar.llvm.0 = hidden unnamed_addr constant +; EXPORTSTATIC-DAG: @P.llvm.0 = hidden global void ()* null +; EXPORTSTATIC-DAG: define hidden i32 @staticfunc.llvm.0 +; EXPORTSTATIC-DAG: define hidden void @staticfunc2.llvm.0 ; Ensure that weak alias to an imported function is correctly turned into ; a declaration. diff --git a/llvm/test/ThinLTO/X86/local_name_conflict.ll b/llvm/test/ThinLTO/X86/local_name_conflict.ll index cefc3ee0dda..e4eb33e524d 100644 --- a/llvm/test/ThinLTO/X86/local_name_conflict.ll +++ b/llvm/test/ThinLTO/X86/local_name_conflict.ll @@ -13,7 +13,7 @@ ; promoted name matches the imported copy. ; RUN: llvm-lto -thinlto-action=import %t.bc -thinlto-index=%t4.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=IMPORT ; IMPORT: call i32 @foo.llvm.[[HASH:[0-9]+]] -; IMPORT: define available_externally dso_local hidden i32 @foo.llvm.[[HASH]]() +; IMPORT: define available_externally hidden i32 @foo.llvm.[[HASH]]() ; The copy in %t2.bc should not be exported/promoted/renamed ; RUN: llvm-lto -thinlto-action=promote %t2.bc -thinlto-index=%t4.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=NOEXPORTSTATIC @@ -21,7 +21,7 @@ ; Make sure foo is promoted and renamed without complaint in %t3.bc. ; RUN: llvm-lto -thinlto-action=promote %t3.bc -thinlto-index=%t4.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=EXPORTSTATIC -; EXPORTSTATIC: define dso_local hidden i32 @foo.llvm. +; EXPORTSTATIC: define hidden i32 @foo.llvm. ; ModuleID = 'local_name_conflict_main.o' source_filename = "local_name_conflict_main.c" diff --git a/llvm/test/ThinLTO/X86/referenced_by_constant.ll b/llvm/test/ThinLTO/X86/referenced_by_constant.ll index 00cc7b9763f..ac72edd5970 100644 --- a/llvm/test/ThinLTO/X86/referenced_by_constant.ll +++ b/llvm/test/ThinLTO/X86/referenced_by_constant.ll @@ -9,15 +9,15 @@ ; cause @referencedbyglobal and @localreferencedbyglobal to be exported ; and promoted). ; RUN: llvm-lto -thinlto-action=import %t.bc -thinlto-index=%t3.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=IMPORT -; IMPORT: @someglobal.llvm.0 = external dso_local hidden unnamed_addr constant -; IMPORT: @someglobal2.llvm.0 = external dso_local hidden unnamed_addr constant +; IMPORT: @someglobal.llvm.0 = external hidden unnamed_addr constant +; IMPORT: @someglobal2.llvm.0 = external hidden unnamed_addr constant ; IMPORT: define available_externally void @bar() ; Check the export side: we currently only export bar(), which causes ; @someglobal and @someglobal2 to be promoted (see above). ; RUN: llvm-lto -thinlto-action=promote %t2.bc -thinlto-index=%t3.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=EXPORT -; EXPORT: @someglobal.llvm.0 = dso_local hidden unnamed_addr constant -; EXPORT: @someglobal2.llvm.0 = dso_local hidden unnamed_addr constant +; EXPORT: @someglobal.llvm.0 = hidden unnamed_addr constant +; EXPORT: @someglobal2.llvm.0 = hidden unnamed_addr constant ; EXPORT: define void @referencedbyglobal() ; EXPORT: define internal void @localreferencedbyglobal() diff --git a/llvm/test/Transforms/FunctionImport/funcimport.ll b/llvm/test/Transforms/FunctionImport/funcimport.ll index 472b20cfafd..4ff51a33b5e 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 dso_local hidden i32 @staticfunc.llvm.{{.*}} !thinlto_src_module !0 { +; INSTLIMDEF-DAG: define available_externally 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 dso_local hidden global void ()* +; CHECK-DAG: @P.llvm.{{.*}} = external 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 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.{{.*}}() +; 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.{{.*}}() ; CHECK-DAG: declare void @variadic(...) declare void @variadic(...) diff --git a/llvm/test/Transforms/ThinLTOBitcodeWriter/comdat.ll b/llvm/test/Transforms/ThinLTOBitcodeWriter/comdat.ll index 2db18a1bf04..caea48e0a54 100644 --- a/llvm/test/Transforms/ThinLTOBitcodeWriter/comdat.ll +++ b/llvm/test/Transforms/ThinLTOBitcodeWriter/comdat.ll @@ -25,9 +25,9 @@ $nt = comdat any ; MERGED-SAME: comdat(${{"?lwt[^ ]+}}) @lwt_aliasee = private unnamed_addr global [1 x i8*] [i8* null], comdat($lwt), !type !0 -; MERGED: {{@"?lwt_nl[^ ]+}} = dso_local hidden unnamed_addr global +; MERGED: {{@"?lwt_nl[^ ]+}} = hidden unnamed_addr global ; MERGED-SAME: comdat(${{"?lwt[^ ]+}}) -; THIN: {{@"?lwt_nl[^ ]+}} = external dso_local hidden +; THIN: {{@"?lwt_nl[^ ]+}} = external hidden @lwt_nl = internal unnamed_addr global i32 0, comdat($lwt) ; MERGED: @nlwt_aliasee = private unnamed_addr global @@ -47,11 +47,11 @@ $nt = comdat any ; THIN-SAME: comdat($nt) @nt_nl = internal unnamed_addr global i32 0, comdat($nt) -; MERGED: {{@"?lwt[^ ]+}} = dso_local hidden unnamed_addr alias +; MERGED: {{@"?lwt[^ ]+}} = hidden unnamed_addr alias ; THIN: {{@"?lwt[^ ]+}} = external hidden @lwt = internal unnamed_addr alias [1 x i8*], [1 x i8*]* @lwt_aliasee -; MERGED: {{@"?nlwt_nl[^ ]+}} = dso_local hidden unnamed_addr alias +; MERGED: {{@"?nlwt_nl[^ ]+}} = hidden unnamed_addr alias ; THIN: {{@"?nlwt_nl[^ ]+}} = external hidden @nlwt_nl = internal unnamed_addr alias [1 x i8*], [1 x i8*]* @nlwt_aliasee diff --git a/llvm/test/Transforms/ThinLTOBitcodeWriter/split-internal1.ll b/llvm/test/Transforms/ThinLTOBitcodeWriter/split-internal1.ll index a36221c5f90..6d18c4f6f65 100644 --- a/llvm/test/Transforms/ThinLTOBitcodeWriter/split-internal1.ll +++ b/llvm/test/Transforms/ThinLTOBitcodeWriter/split-internal1.ll @@ -12,8 +12,8 @@ ; BCA0: <GLOBALVAL_SUMMARY_BLOCK ; BCA1-NOT: <GLOBALVAL_SUMMARY_BLOCK -; M0: @"g$581d7631532fa146ba4061179da39272" = external dso_local hidden global i8{{$}} -; M1: @"g$581d7631532fa146ba4061179da39272" = dso_local hidden global i8 42, !type !0 +; M0: @"g$581d7631532fa146ba4061179da39272" = external hidden global i8{{$}} +; M1: @"g$581d7631532fa146ba4061179da39272" = hidden global i8 42, !type !0 @g = internal global i8 42, !type !0 ; M0: define i8* @f() diff --git a/llvm/test/Transforms/ThinLTOBitcodeWriter/split-internal2.ll b/llvm/test/Transforms/ThinLTOBitcodeWriter/split-internal2.ll index 5cfa14fddb8..fbe618f08e3 100644 --- a/llvm/test/Transforms/ThinLTOBitcodeWriter/split-internal2.ll +++ b/llvm/test/Transforms/ThinLTOBitcodeWriter/split-internal2.ll @@ -16,8 +16,8 @@ ; M1: @g = global void ()* @"f$13757e0fb71915e385efa4dc9d1e08fd", !type !0 @g = global void ()* @f, !type !0 -; M0: define dso_local hidden void @"f$13757e0fb71915e385efa4dc9d1e08fd"() -; M1: declare dso_local hidden void @"f$13757e0fb71915e385efa4dc9d1e08fd"() +; M0: define hidden void @"f$13757e0fb71915e385efa4dc9d1e08fd"() +; M1: declare hidden void @"f$13757e0fb71915e385efa4dc9d1e08fd"() define internal void @f() { call void @f2() ret void diff --git a/llvm/test/Transforms/ThinLTOBitcodeWriter/split-vfunc-internal.ll b/llvm/test/Transforms/ThinLTOBitcodeWriter/split-vfunc-internal.ll index 3bf7b5f53b3..087796b5031 100644 --- a/llvm/test/Transforms/ThinLTOBitcodeWriter/split-vfunc-internal.ll +++ b/llvm/test/Transforms/ThinLTOBitcodeWriter/split-vfunc-internal.ll @@ -6,14 +6,14 @@ define [1 x i8*]* @source() { ret [1 x i8*]* @g } -; M0: @"g$84f59439b469192440047efc8de357fb" = external dso_local hidden constant [1 x i8*]{{$}} -; M1: @"g$84f59439b469192440047efc8de357fb" = dso_local hidden constant [1 x i8*] [i8* bitcast (i64 (i8*)* @"ok$84f59439b469192440047efc8de357fb" to i8*)] +; M0: @"g$84f59439b469192440047efc8de357fb" = external hidden constant [1 x i8*]{{$}} +; M1: @"g$84f59439b469192440047efc8de357fb" = hidden constant [1 x i8*] [i8* bitcast (i64 (i8*)* @"ok$84f59439b469192440047efc8de357fb" to i8*)] @g = internal constant [1 x i8*] [ i8* bitcast (i64 (i8*)* @ok to i8*) ], !type !0 -; M0: define dso_local hidden i64 @"ok$84f59439b469192440047efc8de357fb" -; M1: define available_externally dso_local hidden i64 @"ok$84f59439b469192440047efc8de357fb" +; M0: define hidden i64 @"ok$84f59439b469192440047efc8de357fb" +; M1: define available_externally hidden i64 @"ok$84f59439b469192440047efc8de357fb" define internal i64 @ok(i8* %this) { ret i64 42 } diff --git a/llvm/test/Transforms/WholeProgramDevirt/export-single-impl.ll b/llvm/test/Transforms/WholeProgramDevirt/export-single-impl.ll index 07509b3b22f..9b7cf8432f7 100644 --- a/llvm/test/Transforms/WholeProgramDevirt/export-single-impl.ll +++ b/llvm/test/Transforms/WholeProgramDevirt/export-single-impl.ll @@ -81,12 +81,12 @@ define void @vf2(i8*) { ret void } -; CHECK: define dso_local hidden void @"vf3$merged"(i8*) { +; CHECK: define hidden void @"vf3$merged"(i8*) { define internal void @vf3(i8*) { ret void } -; CHECK: define dso_local hidden void @"vf4$merged"(i8*) comdat { +; CHECK: define hidden void @"vf4$merged"(i8*) comdat { define internal void @vf4(i8*) comdat { ret void } diff --git a/llvm/test/tools/gold/X86/emit-llvm.ll b/llvm/test/tools/gold/X86/emit-llvm.ll index 2baf3107e58..8bab561889a 100644 --- a/llvm/test/tools/gold/X86/emit-llvm.ll +++ b/llvm/test/tools/gold/X86/emit-llvm.ll @@ -54,8 +54,8 @@ define hidden void @f1() { ret void } -; CHECK-DAG: define dso_local hidden void @f2() -; OPT-DAG: define dso_local hidden void @f2() +; CHECK-DAG: define hidden void @f2() +; OPT-DAG: define hidden void @f2() define hidden void @f2() { ret void } diff --git a/llvm/test/tools/gold/X86/thinlto_linkonceresolution.ll b/llvm/test/tools/gold/X86/thinlto_linkonceresolution.ll index 9b10c2767f4..e5e30478d13 100644 --- a/llvm/test/tools/gold/X86/thinlto_linkonceresolution.ll +++ b/llvm/test/tools/gold/X86/thinlto_linkonceresolution.ll @@ -21,7 +21,7 @@ ; confirm the weak linkage directly in the saved opt bitcode files. ; CHECK-NOT: U f ; OPT-NOT: @f() -; OPT2: define weak_odr dso_local hidden void @f() +; OPT2: define weak_odr hidden void @f() target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/tools/llvm-split/internal.ll b/llvm/test/tools/llvm-split/internal.ll index 0eb4acefb9b..ce4272c5f0d 100644 --- a/llvm/test/tools/llvm-split/internal.ll +++ b/llvm/test/tools/llvm-split/internal.ll @@ -2,8 +2,8 @@ ; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 %s ; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1 %s -; CHECK0: define dso_local hidden void @foo() -; CHECK1: declare dso_local hidden void @foo() +; CHECK0: define hidden void @foo() +; CHECK1: declare hidden void @foo() define internal void @foo() { call void @bar() ret void diff --git a/llvm/test/tools/llvm-split/unnamed.ll b/llvm/test/tools/llvm-split/unnamed.ll index b99696a3ce7..fd24b4ca92b 100644 --- a/llvm/test/tools/llvm-split/unnamed.ll +++ b/llvm/test/tools/llvm-split/unnamed.ll @@ -2,16 +2,16 @@ ; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 %s ; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1 %s -; CHECK0: declare dso_local hidden void @__llvmsplit_unnamed() -; CHECK1: define dso_local hidden void @__llvmsplit_unnamed() +; CHECK0: declare hidden void @__llvmsplit_unnamed() +; CHECK1: define hidden void @__llvmsplit_unnamed() define internal void @0() { ; CHECK1: call void @foo() call void @foo() ret void } -; CHECK0: declare dso_local hidden void @__llvmsplit_unnamed.1() -; CHECK1: define dso_local hidden void @__llvmsplit_unnamed.1() +; CHECK0: declare hidden void @__llvmsplit_unnamed.1() +; CHECK1: define hidden void @__llvmsplit_unnamed.1() define internal void @1() { ; CHECK1: call void @foo() ; CHECK1: call void @foo() |