diff options
Diffstat (limited to 'source/opt/pass.h')
-rw-r--r-- | source/opt/pass.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/opt/pass.h b/source/opt/pass.h index 4a8ea674..b2303e23 100644 --- a/source/opt/pass.h +++ b/source/opt/pass.h @@ -28,6 +28,13 @@ #include "spirv-tools/libspirv.hpp" #include "types.h" +// Avoid unused variable warning/error on Linux +#ifndef NDEBUG +#define USE_ASSERT(x) assert(x) +#else +#define USE_ASSERT(x) ((void)(x)) +#endif + namespace spvtools { namespace opt { |