From 66836a0621154a301fea7f6efc6a78f23b8de645 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Fri, 20 May 2016 05:15:42 +0000 Subject: [profile] PROF_ERR, PROF_WARN 1) Move common prefix to the macro def 2) Introduced PROF_WARN 3) Make error message unconditionally printed out. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270185 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/profile/InstrProfilingFile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/profile/InstrProfilingFile.c') diff --git a/lib/profile/InstrProfilingFile.c b/lib/profile/InstrProfilingFile.c index a2057e83a..571195613 100644 --- a/lib/profile/InstrProfilingFile.c +++ b/lib/profile/InstrProfilingFile.c @@ -228,13 +228,13 @@ int __llvm_profile_write_file(void) { GetEnvHook = &getenv; /* Check the filename. */ if (!__llvm_profile_CurrentFilename) { - PROF_ERR("LLVM Profile: Failed to write file : %s\n", "Filename not set"); + PROF_ERR("Failed to write file : %s\n", "Filename not set"); return -1; } /* Check if there is llvm/runtime version mismatch. */ if (GET_VERSION(__llvm_profile_get_version()) != INSTR_PROF_RAW_VERSION) { - PROF_ERR("LLVM Profile: runtime and instrumentation version mismatch : " + PROF_ERR("Runtime and instrumentation version mismatch : " "expected %d, but get %d\n", INSTR_PROF_RAW_VERSION, (int)GET_VERSION(__llvm_profile_get_version())); @@ -244,7 +244,7 @@ int __llvm_profile_write_file(void) { /* Write the file. */ rc = writeFileWithName(__llvm_profile_CurrentFilename); if (rc) - PROF_ERR("LLVM Profile: Failed to write file \"%s\": %s\n", + PROF_ERR("Failed to write file \"%s\": %s\n", __llvm_profile_CurrentFilename, strerror(errno)); return rc; } -- cgit v1.2.3