summaryrefslogtreecommitdiffstats
path: root/source/slang/bytecode.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2017-11-04 15:37:40 -0400
committerYong He <yonghe@outlook.com>2017-11-04 15:37:40 -0400
commit664e0da8dff1d04860cc46ce8139cbd47e15c552 (patch)
treef5d023e6799d5265d91db2368896c6ad3b51ea4c /source/slang/bytecode.cpp
parent8fe947b2fbbdaa747fb7acc7624d9290bba52086 (diff)
fix all unreachable code warnings
Diffstat (limited to 'source/slang/bytecode.cpp')
-rw-r--r--source/slang/bytecode.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/bytecode.cpp b/source/slang/bytecode.cpp
index f1b23849d..ed969b72d 100644
--- a/source/slang/bytecode.cpp
+++ b/source/slang/bytecode.cpp
@@ -271,9 +271,9 @@ BCConst getGlobalValue(
}
SLANG_UNEXPECTED("no ID for inst");
- bcConst.flavor = (BCConstFlavor) -1;
- bcConst.id = -9999;
- return bcConst;
+ UNREACHABLE(bcConst.flavor = (BCConstFlavor) -1);
+ UNREACHABLE(bcConst.id = -9999);
+ UNREACHABLE_RETURN(bcConst);
}
Int getLocalID(
@@ -577,7 +577,7 @@ BytecodeGenerationPtr<BCType> emitBCTypeImpl(
SLANG_UNEXPECTED("unimplemented");
- return BytecodeGenerationPtr<BCType>();
+ UNREACHABLE_RETURN(BytecodeGenerationPtr<BCType>());
}
BytecodeGenerationPtr<BCType> emitBCType(