Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1616)

Unified Diff: runtime/platform/globals.h

Issue 1410293006: Use ExitProcess on Windows. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add comment Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/thread_win.cc ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/globals.h
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 5a9bf040db335ebab2dabe292ab23a83d78cda2e..8d3a15524c529b3f42785a0b862b2e5571709406 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -233,6 +233,18 @@ typedef simd128_value_t fpu_register_t;
#define DART_UNUSED
#endif
+// DART_NORETURN indicates to the compiler that a function doees not return.
+// It should be used on functions that unconditionally call functions like
+// exit(), which end the program. We use it to avoid compiler warnings in
+// callers of DART_NORETURN functions.
+#ifdef _MSC_VER
+#define DART_NORETURN __declspec(noreturn)
+#elif __GNUC__
+#define DART_NORETURN __attribute__((noreturn))
+#else
+#error Automatic compiler detection failed.
+#endif
+
#if !defined(TARGET_ARCH_MIPS)
#if !defined(TARGET_ARCH_ARM)
#if !defined(TARGET_ARCH_X64)
« no previous file with comments | « runtime/bin/thread_win.cc ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698