1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/tools/llvm-split/unnamed.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

32 lines
813 B
LLVM

; RUN: llvm-split -o %t %s
; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 %s
; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1 %s
; 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 hidden void @__llvmsplit_unnamed.1()
; CHECK1: define hidden void @__llvmsplit_unnamed.1()
define internal void @1() {
; CHECK1: call void @foo()
; CHECK1: call void @foo()
call void @foo()
call void @foo()
ret void
}
; CHECK0: define void @foo()
; CHECK1: declare void @foo()
define void @foo() {
; CHECK0: call void @__llvmsplit_unnamed.1()
; CHECK0: call void @__llvmsplit_unnamed()
call void @1()
call void @0()
ret void
}