llvm-6502/test/Linker/metadata-function.ll
Duncan P. N. Exon Smith 8efc190690 Linker: Copy over function metadata attachments
Update `lib/Linker` to handle `Function` metadata attachments.  The
attachments stick with the function body.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235786 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-24 22:07:31 +00:00

27 lines
642 B
LLVM

; RUN: llvm-link %s %S/Inputs/metadata-function.ll -S | FileCheck %s
; RUN: llvm-link %S/Inputs/metadata-function.ll %s -S | FileCheck %s
; CHECK-DAG: define weak void @foo() !weak ![[B:[0-9]+]] {
define linkonce void @foo() !linkonce !0 {
unreachable
}
; CHECK-DAG: define void @bar() !bar ![[A:[0-9]+]] {
define void @bar() !bar !0 {
call void @baz()
unreachable
}
; CHECK-DAG: define void @baz() !baz ![[B]] {
declare void @baz()
; CHECK-DAG: define void @a() !a ![[A]] {
; CHECK-DAG: define void @b() !b ![[B]] {
define void @a() !a !0 {
unreachable
}
; CHECK-DAG: ![[A]] = !{!"a"}
; CHECK-DAG: ![[B]] = !{!"b"}
!0 = !{!"a"}