xref: /llvm-project/clang/test/CodeGen/memory-profile-filename.c (revision 95824be18fcd70a90787fecd1e51ca0c67d8bd20)
1 // Test that we get the expected module flag metadata for the memory profile
2 // filename.
3 // RUN: %clang -target x86_64-linux-gnu -S -emit-llvm -o - %s | FileCheck %s --check-prefix=NONE
4 // RUN: %clang -target x86_64-linux-gnu -fmemory-profile -S -emit-llvm -o - %s | FileCheck %s --check-prefix=DEFAULTNAME
5 // RUN: %clang -target x86_64-linux-gnu -fmemory-profile=/tmp -S -emit-llvm -o - %s | FileCheck %s --check-prefix=CUSTOMNAME
main(void)6 int main(void) {
7   return 0;
8 }
9 
10 // NONE-NOT: MemProfProfileFilename
11 // DEFAULTNAME: !{i32 1, !"MemProfProfileFilename", !"memprof.profraw"}
12 // CUSTOMNAME: !{i32 1, !"MemProfProfileFilename", !"/tmp{{.*}}memprof.profraw"}
13