xref: /llvm-project/clang/test/CodeGen/memory-profile-filename.c (revision 95824be18fcd70a90787fecd1e51ca0c67d8bd20)
10949f96dSTeresa Johnson // Test that we get the expected module flag metadata for the memory profile
20949f96dSTeresa Johnson // filename.
30949f96dSTeresa Johnson // RUN: %clang -target x86_64-linux-gnu -S -emit-llvm -o - %s | FileCheck %s --check-prefix=NONE
40949f96dSTeresa Johnson // RUN: %clang -target x86_64-linux-gnu -fmemory-profile -S -emit-llvm -o - %s | FileCheck %s --check-prefix=DEFAULTNAME
50949f96dSTeresa Johnson // RUN: %clang -target x86_64-linux-gnu -fmemory-profile=/tmp -S -emit-llvm -o - %s | FileCheck %s --check-prefix=CUSTOMNAME
main(void)60949f96dSTeresa Johnson int main(void) {
70949f96dSTeresa Johnson   return 0;
80949f96dSTeresa Johnson }
90949f96dSTeresa Johnson 
100949f96dSTeresa Johnson // NONE-NOT: MemProfProfileFilename
110949f96dSTeresa Johnson // DEFAULTNAME: !{i32 1, !"MemProfProfileFilename", !"memprof.profraw"}
12*95824be1STeresa Johnson // CUSTOMNAME: !{i32 1, !"MemProfProfileFilename", !"/tmp{{.*}}memprof.profraw"}
13