projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #4621 from alexanderkyte/strdup_env
[mono.git]
/
mono
/
mini
/
mini-llvm.c
diff --git
a/mono/mini/mini-llvm.c
b/mono/mini/mini-llvm.c
index b3517ab58aa0abeb7af420553c95d8459bd15d28..0500f102a5729388457926e6b6554c9ab7ca574c 100644
(file)
--- a/
mono/mini/mini-llvm.c
+++ b/
mono/mini/mini-llvm.c
@@
-6930,13
+6930,16
@@
emit_method_inner (EmitContext *ctx)
static int count = 0;
count ++;
static int count = 0;
count ++;
- if (g_getenv ("LLVM_COUNT")) {
- if (count == atoi (g_getenv ("LLVM_COUNT"))) {
+ char *llvm_count_str = g_getenv ("LLVM_COUNT");
+ if (llvm_count_str) {
+ int lcount = atoi (llvm_count_str);
+ g_free (llvm_count_str);
+ if (count == lcount) {
printf ("LAST: %s\n", mono_method_full_name (cfg->method, TRUE));
fflush (stdout);
last = TRUE;
}
printf ("LAST: %s\n", mono_method_full_name (cfg->method, TRUE));
fflush (stdout);
last = TRUE;
}
- if (count >
atoi (g_getenv ("LLVM_COUNT"))
) {
+ if (count >
lcount
) {
set_failure (ctx, "count");
return;
}
set_failure (ctx, "count");
return;
}