summaryrefslogtreecommitdiffstats
path: root/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'source/core')
-rw-r--r--source/core/common.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/core/common.h b/source/core/common.h
index dbb837821..3a4543085 100644
--- a/source/core/common.h
+++ b/source/core/common.h
@@ -43,6 +43,14 @@ namespace Slang
#define SLANG_RETURN_NEVER /* empty */
#endif
+#ifdef _MSC_VER
+#define UNREACHABLE_RETURN(x)
+#define UNREACHABLE(x)
+#else
+#define UNREACHABLE_RETURN(x) return x;
+#define UNREACHABLE(x) x;
+#endif
+
SLANG_RETURN_NEVER void signalUnexpectedError(char const* message);
}