1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/Bitcode/dso_location.ll
Rafael Espindola bfea7bc2f8 Make GlobalValues with non-default visibilility dso_local.
This is similar to r322317, but for visibility. It is not as neat
because we have to special case extern_weak.

The idea is the same as the previous change, make the transition to
explicit dso_local easier for the frontends. With this they only have
to add dso_local to symbols where we need some external information to
decide if it is dso_local (like it being part of an ELF executable).

llvm-svn: 322806
2018-01-18 02:08:23 +00:00

48 lines
1.5 KiB
LLVM

; 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
@hidden_local_global = hidden global i32 0
; CHECK: @hidden_local_global = hidden 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
@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()
declare hidden void @hidden_local()
; CHECK: declare hidden void @hidden_local()
define protected void @protected_local() {
; CHECK: define protected void @protected_local()
entry:
ret void
}
define i8* @ifunc_resolver() {
entry:
ret i8* null
}