aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/tools/llvm-extract/delete-ifunc.ll
blob: 0ffa3374153262e42df656f24470179d176f7480 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
; RUN: llvm-extract -func foo -S %s | FileCheck %s

; llvm-extract should not copy ifuncs into the new module, so make sure they
; are turned into declarations.

; CHECK: define void @foo() {
; CHECK: call void @ifunc()
define void @foo() {
  call void @ifunc()
  ret void
}

define void @ifunc_impl() {
  ret void
}

; CHECK: declare void @ifunc()
@ifunc = ifunc void (), ptr @ifunc_resolver

define internal ptr @ifunc_resolver() {
  ret ptr @ifunc_impl
}