xref: /llvm-project/llvm/test/Transforms/DeadArgElim/linkage.ll (revision 055fb7795aa219a3d274d280ec9129784f169f56)
1e76ecbb0SBjorn Pettersson; RUN: opt < %s -passes=deadargelim -S | FileCheck %s
2cee313d2SEric Christopher
3cee313d2SEric Christopher; rdar://11546243
4cee313d2SEric Christopher%struct.A = type { i8 }
5cee313d2SEric Christopher
6*055fb779SNikita Popovdefine available_externally void @_Z17externallyDefinedP1A(ptr %a) {
7cee313d2SEric Christopherentry:
8cee313d2SEric Christopher  call void @_Z3foov()
9cee313d2SEric Christopher  ret void
10cee313d2SEric Christopher}
11cee313d2SEric Christopher
12cee313d2SEric Christopherdeclare void @_Z3foov()
13cee313d2SEric Christopher
14*055fb779SNikita Popovdefine void @_Z4testP1A(ptr %a) {
15cee313d2SEric Christopher; CHECK: @_Z4testP1A
16*055fb779SNikita Popov; CHECK: @_Z17externallyDefinedP1A(ptr %a)
17cee313d2SEric Christopher
18cee313d2SEric Christopherentry:
19*055fb779SNikita Popov  call void @_Z17externallyDefinedP1A(ptr %a)
20cee313d2SEric Christopher  ret void
21cee313d2SEric Christopher}
22