xref: /llvm-project/llvm/test/Transforms/LowerTypeTests/section.ll (revision d3d7ba12033f20dfbc8eb6c60954478cff0d0182)
1; Test that functions with "section" attribute are accepted, and jumptables are
2; emitted in ".text".
3
4; RUN: opt -S -passes=lowertypetests %s | FileCheck %s
5
6target triple = "x86_64-unknown-linux-gnu"
7
8; CHECK: @f = alias void (), ptr @[[JT:.*]]
9; CHECK: define hidden void @f.cfi() section "xxx"
10
11define void @f() section "xxx" !type !0 {
12entry:
13  ret void
14}
15
16define i1 @g() {
17entry:
18  %0 = call i1 @llvm.type.test(ptr @f, metadata !"_ZTSFvE")
19  ret i1 %0
20}
21
22; CHECK: define private void @[[JT]]() #{{.*}} align {{.*}} {
23
24declare i1 @llvm.type.test(ptr, metadata) nounwind readnone
25
26!0 = !{i64 0, !"_ZTSFvE"}
27