2021-08-15 13:01:10 +08:00
|
|
|
; RUN: split-file %s %t
|
|
|
|
; RUN: llvm-link %t/a.ll %t/b.ll -S -o - | FileCheck %s
|
|
|
|
|
|
|
|
;; Check that ifuncs are linked in properly.
|
|
|
|
|
2022-05-31 17:58:35 +08:00
|
|
|
; CHECK-DAG: @foo = ifunc void (), ptr @foo_resolve
|
|
|
|
; CHECK-DAG: define internal ptr @foo_resolve() {
|
2021-08-15 13:01:10 +08:00
|
|
|
|
2022-05-31 17:58:35 +08:00
|
|
|
; CHECK-DAG: @bar = ifunc void (), ptr @bar_resolve
|
|
|
|
; CHECK-DAG: define internal ptr @bar_resolve() {
|
2021-08-15 13:01:10 +08:00
|
|
|
|
|
|
|
;--- a.ll
|
|
|
|
declare void @bar()
|
|
|
|
|
|
|
|
;--- b.ll
|
2022-05-31 17:58:35 +08:00
|
|
|
@foo = ifunc void (), ptr @foo_resolve
|
|
|
|
@bar = ifunc void (), ptr @bar_resolve
|
2021-08-15 13:01:10 +08:00
|
|
|
|
2022-05-31 17:58:35 +08:00
|
|
|
define internal ptr @foo_resolve() {
|
|
|
|
ret ptr null
|
2021-08-15 13:01:10 +08:00
|
|
|
}
|
|
|
|
|
2022-05-31 17:58:35 +08:00
|
|
|
define internal ptr @bar_resolve() {
|
|
|
|
ret ptr null
|
2021-08-15 13:01:10 +08:00
|
|
|
}
|