[compiler-rt] [Profile] Disable continuous mode when reset to default.profraw due to malformed LLVM_PROFILE_FILE. (PR #74879)

Zequan Wu via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 8 10:44:08 PST 2023


================
@@ -0,0 +1,21 @@
+// REQUIRES: darwin || linux
+
+// Test when LLVM_PROFILE_FILE is set incorrectly, it should fall backs to use default.profraw without runtime error.
+
+// Create & cd into a temporary directory.
+// RUN: rm -rf %t.dir && mkdir -p %t.dir && cd %t.dir
+// RUN: %clang -fprofile-instr-generate -fcoverage-mapping -mllvm -runtime-counter-relocation=true -o %t.exe %s
+// RUN: env LLVM_PROFILE_FILE="incorrect-profile-name%m%c%c.profraw" %run %t.exe
+// RUN: ls -l default.profraw | FileCheck %s
+
+// CHECK:     default.profraw
+// CEHCK-NOT: incorrect-profile-name.profraw
----------------
ZequanWu wrote:

Done.

https://github.com/llvm/llvm-project/pull/74879


More information about the llvm-commits mailing list