mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-15 07:59:57 +00:00
Don't call exit from a runtime.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157450 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d5ce3ffa67
commit
717f7fa12a
@ -121,7 +121,7 @@ void llvm_gcda_start_file(const char *orig_filename) {
|
||||
fprintf(stderr, "LLVM profiling runtime: while opening '%s': ",
|
||||
cptr ? cptr + 1 : orig_filename);
|
||||
perror("");
|
||||
exit(1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -167,6 +167,7 @@ void llvm_gcda_emit_function(uint32_t ident, const char *function_name) {
|
||||
#ifdef DEBUG_GCDAPROFILING
|
||||
printf("llvmgcda: function id=%x\n", ident);
|
||||
#endif
|
||||
if (!output_file) return;
|
||||
|
||||
/* function tag */
|
||||
fwrite("\0\0\0\1", 4, 1, output_file);
|
||||
@ -179,7 +180,9 @@ void llvm_gcda_emit_function(uint32_t ident, const char *function_name) {
|
||||
|
||||
void llvm_gcda_emit_arcs(uint32_t num_counters, uint64_t *counters) {
|
||||
uint32_t i;
|
||||
/* counter #1 (arcs) tag */
|
||||
|
||||
/* Counter #1 (arcs) tag */
|
||||
if (!output_file) return;
|
||||
fwrite("\0\0\xa1\1", 4, 1, output_file);
|
||||
write_int32(num_counters * 2);
|
||||
for (i = 0; i < num_counters; ++i) {
|
||||
@ -196,6 +199,7 @@ void llvm_gcda_emit_arcs(uint32_t num_counters, uint64_t *counters) {
|
||||
|
||||
void llvm_gcda_end_file() {
|
||||
/* Write out EOF record. */
|
||||
if (!output_file) return;
|
||||
fwrite("\0\0\0\0\0\0\0\0", 8, 1, output_file);
|
||||
fclose(output_file);
|
||||
output_file = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user