1; RUN: opt < %s -print-callgraph -disable-output 2>&1 | FileCheck %s
2; RUN: opt < %s -passes=print-callgraph -disable-output 2>&1 | FileCheck %s
3
4; CHECK: Call graph node for function: 'caller'
5; CHECK-NEXT:   CS<{{.*}}> calls function 'broker'
6; CHECK-NEXT:   CS<None> calls function 'callback'
7
8define void @caller(i32* %arg) {
9  call void @broker(void (i32*)* @callback, i32* %arg)
10  ret void
11}
12
13define void @callback(i32* %arg) {
14  ret void
15}
16
17declare !callback !0 void @broker(void (i32*)*, i32*)
18
19!0 = !{!1}
20!1 = !{i64 0, i64 1, i1 false}
21