summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/profile/InstrProfiling.h
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/profile/InstrProfiling.h')
-rw-r--r--compiler-rt/lib/profile/InstrProfiling.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler-rt/lib/profile/InstrProfiling.h b/compiler-rt/lib/profile/InstrProfiling.h
index 54142c4227d..f62a77bccf2 100644
--- a/compiler-rt/lib/profile/InstrProfiling.h
+++ b/compiler-rt/lib/profile/InstrProfiling.h
@@ -19,10 +19,11 @@
#define LLVM_LIBRARY_VISIBILITY __attribute__((visibility("hidden")))
#define LLVM_SECTION(Sect) __attribute__((section(Sect)))
-#define PROF_ERR(Format, ...) \
- if (getenv("LLVM_PROFILE_VERBOSE_ERRORS")) \
- fprintf(stderr, Format, __VA_ARGS__ );
+#define PROF_ERR(Format, ...) \
+ if (GetEnvHook && GetEnvHook("LLVM_PROFILE_VERBOSE_ERRORS")) \
+ fprintf(stderr, Format, __VA_ARGS__);
+extern char *(*GetEnvHook)(const char *);
#if defined(__FreeBSD__) && defined(__i386__)
OpenPOWER on IntegriCloud