Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomáš Rylek <trylek@microsoft.com>2020-12-08 05:19:44 +0300
committerGitHub <noreply@github.com>2020-12-08 05:19:44 +0300
commit69e114c1abf91241a0eeecf1ecceab4711b8aa62 (patch)
treeb81a0b35748f5e598412bcc504335cdbd322cd43 /src/coreclr/jit/host.h
parent0ec07945a9759a72a689edbb01e69b232e26e05a (diff)
December infra rollout - remove duplicated 'src' from coreclr subrepo (src/coreclr/src becomes src/coreclr) (#44973)
* Move src/coreclr/src/Directory.Build.targets to src/coreclr Merge src/coreclr/src/CMakeLists.txt into src/coreclr/CMakeLists.txt * Mechanical move of src/coreclr/src to src/coreclr * Scripts adjustments to reflect the changed paths
Diffstat (limited to 'src/coreclr/jit/host.h')
-rw-r--r--src/coreclr/jit/host.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/coreclr/jit/host.h b/src/coreclr/jit/host.h
new file mode 100644
index 00000000000..ea9abdddcc9
--- /dev/null
+++ b/src/coreclr/jit/host.h
@@ -0,0 +1,64 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+/*****************************************************************************/
+
+#ifdef DEBUG
+
+#undef printf
+#define printf logf
+
+#undef fprintf
+#define fprintf flogf
+
+class Compiler;
+class LogEnv
+{
+public:
+ LogEnv(ICorJitInfo* aCompHnd);
+ void setCompiler(Compiler* val)
+ {
+ const_cast<Compiler*&>(compiler) = val;
+ }
+
+ ICorJitInfo* const compHnd;
+ Compiler* const compiler;
+};
+
+BOOL vlogf(unsigned level, const char* fmt, va_list args);
+int vflogf(FILE* file, const char* fmt, va_list args);
+
+int logf(const char* fmt, ...);
+int flogf(FILE* file, const char* fmt, ...);
+void gcDump_logf(const char* fmt, ...);
+
+void logf(unsigned level, const char* fmt, ...);
+
+extern "C" void ANALYZER_NORETURN __cdecl assertAbort(const char* why, const char* file, unsigned line);
+
+#undef assert
+#define assert(p) (void)((p) || (assertAbort(#p, __FILE__, __LINE__), 0))
+
+#else // DEBUG
+
+#undef assert
+#define assert(p) (void)0
+#endif // DEBUG
+
+/*****************************************************************************/
+#ifndef _HOST_H_
+#define _HOST_H_
+/*****************************************************************************/
+
+extern FILE* jitstdout;
+
+inline FILE* procstdout()
+{
+ return stdout;
+}
+#undef stdout
+#define stdout use_jitstdout
+
+/*****************************************************************************/
+#endif
+/*****************************************************************************/