summaryrefslogtreecommitdiffstats
path: root/llvm/test/Linker/byval-types.ll
blob: d6bd4aa0c7b9b6611d3287177d4946d78b332cdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
; RUN: llvm-link %s %p/Inputs/byval-types-1.ll -S | FileCheck %s

%struct = type {i32, i8}

declare void @foo(%struct* byval(%struct) %a)

define void @bar() {
  %ptr = alloca %struct
; CHECK: call void @foo(%struct* byval(%struct) %ptr)
  call void @foo(%struct* byval(%struct) %ptr)
  ret void
}

; CHECK: define void @foo(%struct* byval(%struct) %a)
; CHECK-NEXT:   call void @baz(%struct* byval(%struct) %a)

; CHECK: declare void @baz(%struct* byval(%struct))
OpenPOWER on IntegriCloud