2017-10-26 17:00:26 +02:00
|
|
|
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
|
|
|
|
|
|
|
|
; Tests parsing for the dso_local keyword as well as the serialization/
|
|
|
|
; deserialization of the dso_local value on GlobalValues.
|
|
|
|
|
|
|
|
@local_global = dso_local global i32 0
|
|
|
|
; CHECK: @local_global = dso_local global i32 0
|
|
|
|
|
|
|
|
@weak_local_global = weak dso_local global i32 0
|
|
|
|
; CHECK: @weak_local_global = weak dso_local global i32 0
|
|
|
|
|
|
|
|
@external_local_global = external dso_local global i32
|
|
|
|
; CHECK: @external_local_global = external dso_local global i32
|
|
|
|
|
|
|
|
@default_local_global = dso_local default global i32 0
|
|
|
|
; CHECK: @default_local_global = dso_local global i32 0
|
|
|
|
|
2018-01-18 03:08:23 +01:00
|
|
|
@hidden_local_global = hidden global i32 0
|
|
|
|
; CHECK: @hidden_local_global = hidden global i32 0
|
2017-10-26 17:00:26 +02:00
|
|
|
|
2018-01-18 03:08:23 +01:00
|
|
|
@protected_local_global = protected global i32 0
|
|
|
|
; CHECK: @protected_local_global = protected global i32 0
|
2017-10-26 17:00:26 +02:00
|
|
|
|
|
|
|
@local_alias = dso_local alias i32, i32* @local_global
|
|
|
|
; CHECK-DAG: @local_alias = dso_local alias i32, i32* @local_global
|
|
|
|
|
|
|
|
@preemptable_alias = dso_preemptable alias i32, i32* @hidden_local_global
|
|
|
|
; CHECK-DAG: @preemptable_alias = alias i32, i32* @hidden_local_global
|
|
|
|
|
|
|
|
@preemptable_ifunc = dso_preemptable ifunc void (), i8* ()* @ifunc_resolver
|
|
|
|
; CHECK-DAG: @preemptable_ifunc = ifunc void (), i8* ()* @ifunc_resolver
|
|
|
|
declare dso_local default void @default_local()
|
|
|
|
; CHECK: declare dso_local void @default_local()
|
|
|
|
|
2018-01-18 03:08:23 +01:00
|
|
|
declare hidden void @hidden_local()
|
|
|
|
; CHECK: declare hidden void @hidden_local()
|
2017-10-26 17:00:26 +02:00
|
|
|
|
2018-01-18 03:08:23 +01:00
|
|
|
define protected void @protected_local() {
|
|
|
|
; CHECK: define protected void @protected_local()
|
2017-10-26 17:00:26 +02:00
|
|
|
entry:
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8* @ifunc_resolver() {
|
|
|
|
entry:
|
|
|
|
ret i8* null
|
|
|
|
}
|