xref: /llvm-project/llvm/test/CodeGen/X86/xray-section-group.ll (revision 7620f03ef7a662384d67b6bd1fad8582dfe9dd82)
1; RUN: llc -mtriple=x86_64-unknown-linux-gnu -function-sections < %s | FileCheck %s
2; RUN: llc -filetype=obj -o %t -mtriple=x86_64-unknown-linux-gnu -function-sections < %s
3; RUN: llvm-objdump --disassemble-all %t | FileCheck %s --check-prefix=CHECK-OBJ
4
5define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always" {
6; CHECK: .section .text.foo,"ax",@progbits
7  ret i32 0
8; CHECK: .section xray_instr_map,"ao",@progbits,foo{{$}}
9}
10
11$bar = comdat any
12define i32 @bar() nounwind noinline uwtable "function-instrument"="xray-always" comdat($bar) {
13; CHECK: .section .text.bar,"axG",@progbits,bar,comdat
14  ret i32 1
15; CHECK: .section xray_instr_map,"aoG",@progbits,bar,bar,comdat{{$}}
16}
17
18; CHECK-OBJ:      section xray_instr_map:
19