From ab3ac985479132856613d6dcc8b43f4a4ef8c6b7 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Fri, 5 May 2023 03:46:42 +0800 Subject: Add SLANG_ASSUME and use it in release asserts (#2859) * Remove UNREACHABLE * formatting * Remove unused SLANG_EXPECT macros * Add SLANG_ASSUME and use it in release asserts * Reassure GCC that we are using memcpy responsibly --------- Co-authored-by: Yong He --- source/slang/slang-emit-hlsl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/slang-emit-hlsl.cpp') diff --git a/source/slang/slang-emit-hlsl.cpp b/source/slang/slang-emit-hlsl.cpp index 434f0803e..96b751789 100644 --- a/source/slang/slang-emit-hlsl.cpp +++ b/source/slang/slang-emit-hlsl.cpp @@ -1168,7 +1168,7 @@ void HLSLSourceEmitter::emitMeshOutputModifiersImpl(IRInst* varInst) : as(modifier) ? "indices " : as(modifier) ? "primitives " : nullptr; - SLANG_EXPECT(s, "Unhandled type of mesh output decoration"); + SLANG_ASSERT(s && "Unhandled type of mesh output decoration"); m_writer->emit(s); } } -- cgit v1.2.3