; RUN: llc -mtriple=x86_64-pc-linux -split-dwarf-file=input.dwo -O3 \ ; RUN: -function-sections -data-sections \ ; RUN: -relocation-model=pic -filetype=asm \ ; RUN: -generate-type-units -o - %s | \ ; RUN: FileCheck %s --check-prefix=CHECK-ASM ; RUN: llc -mtriple=x86_64-pc-linux -split-dwarf-file=input.dwo -O3 \ ; RUN: -function-sections -data-sections \ ; RUN: -relocation-model=pic -filetype=obj \ ; RUN: -generate-type-units -o - %s | \ ; RUN: llvm-readelf -sections | \ ; RUN: FileCheck %s --check-prefix=CHECK-ELF ; Created from `clang++ -fxray-instrument -gsplit-dwarf -fdebug-types-section ; -ffunction-sections -fdata-sections -emit-llvm -S input.cc`: ; input.cc: ; ; class a { ; int b(); ; }; ; int a::b() { ; for (;;) ; ; ; } ; ; In this test we want to make sure that the xray_instr_map section for ; `a::b()` is actually associated with the function's symbol instead of the ; .debug_types.dwo section. ; ; CHECK-ASM: xray_fn_idx,"awo",@progbits,_ZN1a1bEv,unique,1 ; ; CHECK-ELF-DAG: [[FSECT:[0-9]+]]] .text._ZN1a1bEv PROGBITS ; CHECK-ELF-DAG: [{{.*}}] .debug_types.dwo PROGBITS ; CHECK-ELF-DAG: [{{.*}}] xray_instr_map PROGBITS {{.*}} {{.*}} {{.*}} {{.*}} WAL [[FSECT]] target triple = "x86_64-pc-linux" %class.a = type { i8 } ; Function Attrs: nounwind readnone uwtable define i32 @_ZN1a1bEv(%class.a* nocapture readnone) local_unnamed_addr #0 align 2 !dbg !8 { tail call void @llvm.dbg.value(metadata %class.a* %0, metadata !17, metadata !DIExpression()), !dbg !19 br label %2, !dbg !20 ;