[Mesa-dev] [PATCH 3/6] nir/spirv: move NORETURN annotation on _vtn_fail() prototype
Brian Paul
brianp at vmware.com
Fri Mar 30 17:31:19 UTC 2018
This needs to before the function, not after, to compile with MSVC.
This works with gcc too.
---
src/compiler/spirv/vtn_private.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h
index 269de92..982b426 100644
--- a/src/compiler/spirv/vtn_private.h
+++ b/src/compiler/spirv/vtn_private.h
@@ -71,8 +71,10 @@ void _vtn_warn(struct vtn_builder *b, const char *file, unsigned line,
* So long as these two things continue to hold, we can easily longjmp back to
* spirv_to_nir(), clean up the builder, and return NULL.
*/
-void _vtn_fail(struct vtn_builder *b, const char *file, unsigned line,
- const char *fmt, ...) NORETURN PRINTFLIKE(4, 5);
+NORETURN void
+_vtn_fail(struct vtn_builder *b, const char *file, unsigned line,
+ const char *fmt, ...) PRINTFLIKE(4, 5);
+
#define vtn_fail(...) _vtn_fail(b, __FILE__, __LINE__, __VA_ARGS__)
/** Fail if the given expression evaluates to true */
--
2.7.4
More information about the mesa-dev
mailing list