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

Unified Diff: src/trusted/service_runtime/arch/x86_32/nacl_switch_to_app_32.c

Issue 1213623017: clang/win: Let the compiler know that NaClSwitch() cannot return. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client@master
Patch Set: comments Created 5 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/service_runtime/arch/x86_32/nacl_switch_to_app_32.c
diff --git a/src/trusted/service_runtime/arch/x86_32/nacl_switch_to_app_32.c b/src/trusted/service_runtime/arch/x86_32/nacl_switch_to_app_32.c
index c6c4a5c502b75f870b291342a80bb771b679dd5c..47e4d9d9b800020842a33a8e510afa99eb7f38de 100644
--- a/src/trusted/service_runtime/arch/x86_32/nacl_switch_to_app_32.c
+++ b/src/trusted/service_runtime/arch/x86_32/nacl_switch_to_app_32.c
@@ -70,4 +70,12 @@ NORETURN void NaClStartThreadInApp(struct NaClAppThread *natp,
context->sysret = 0; /* %eax not used to return */
NaClSwitch(context);
+
+#if NACL_WINDOWS && defined(__clang__)
+ /*
+ * NaClSwitch is a function pointer in x86_32 and there's no way to mark
+ * the function pointed to by a function pointer as noreturn in clang-cl mode.
+ */
+ __builtin_unreachable();
+#endif
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698