llvm-for-llvmta/test/Instrumentation/HeapProfiler/filename.ll

16 lines
540 B
LLVM
Raw Permalink Normal View History

2022-04-25 10:02:23 +02:00
; Test to ensure that the filename provided by clang in the module flags
; metadata results in the expected __memprof_profile_filename insertion.
; RUN: opt < %s -mtriple=x86_64-unknown-linux -memprof -memprof-module -S | FileCheck --check-prefixes=CHECK %s
define i32 @main() {
entry:
ret i32 0
}
!llvm.module.flags = !{!0}
!0 = !{i32 1, !"MemProfProfileFilename", !"/tmp/memprof.profraw"}
; CHECK: $__memprof_profile_filename = comdat any
; CHECK: @__memprof_profile_filename = constant [21 x i8] c"/tmp/memprof.profraw\00", comdat