[profile][test] Delete profraw directory so that tests are immune to format version upgrade

This commit is contained in:
Fangrui Song 2021-06-18 16:44:03 -07:00
parent d6467e00df
commit 5540470f64
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,6 @@
// REQUIRES: linux, lld-available
// RUN: rm -rf %t.profraw
// RUN: %clang_profgen=%t.profraw -fuse-ld=lld -fcoverage-mapping -mllvm -enable-name-compression=false -DCODE=1 -ffunction-sections -fdata-sections -Wl,--gc-sections -o %t %s
// RUN: %run %t
// RUN: llvm-profdata merge -o %t.profdata %t.profraw
@ -9,6 +10,7 @@
// RUN: llvm-readelf -x __llvm_prf_names %t | FileCheck %s -check-prefix=PRF_NAMES
// RUN: llvm-size -A %t | FileCheck %s -check-prefix=PRF_CNTS
// RUN: rm -rf %t.lto.profraw
// RUN: %clang_lto_profgen=%t.lto.profraw -fuse-ld=lld -fcoverage-mapping -mllvm -enable-name-compression=false -DCODE=1 -ffunction-sections -fdata-sections -Wl,--gc-sections -flto -o %t.lto %s
// RUN: %run %t.lto
// RUN: llvm-profdata merge -o %t.lto.profdata %t.lto.profraw
@ -27,6 +29,7 @@
// Note: We also check the IR instrumentation and expect foo() to be garbage
// collected as well.
// RUN: rm -rf %t.pgo.profraw
// RUN: %clang_pgogen=%t.pgo.profraw -fuse-ld=lld -DCODE=1 -ffunction-sections -fdata-sections -Wl,--gc-sections -o %t.pgo %s
// RUN: %run %t.pgo
// RUN: llvm-profdata merge -o %t.pgo.profdata %t.pgo.profraw

View File

@ -1,6 +1,7 @@
// REQUIRES: binutils_lto
// RUN: %clang_pgogen=%t.profraw -fuse-ld=bfd -flto %s -o %t
// RUN: rm -rf %t.profraw
// RUN: %clang_pgogen=%t.profraw/ -fuse-ld=bfd -flto %s -o %t
// RUN: %run %t
// RUN: llvm-profdata merge %t.profraw -o %t.profdata
// RUN: llvm-profdata show %t.profdata | FileCheck %s