summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2017-11-04 16:23:21 -0400
committerYong He <yonghe@outlook.com>2017-11-04 16:23:21 -0400
commita7dd782d7895e1f277573fb9923be653ab813941 (patch)
treed2d852a6cd806034af6ed1d677f617e7867a020f
parent8d19b2b4443101040acaf7d9dce2a7a6affea712 (diff)
fix linux build
-rw-r--r--source/slang/bytecode.cpp9
-rw-r--r--source/slang/check.cpp2
2 files changed, 7 insertions, 4 deletions
diff --git a/source/slang/bytecode.cpp b/source/slang/bytecode.cpp
index 2130972e2..e3cd9e74e 100644
--- a/source/slang/bytecode.cpp
+++ b/source/slang/bytecode.cpp
@@ -271,9 +271,12 @@ BCConst getGlobalValue(
}
SLANG_UNEXPECTED("no ID for inst");
- UNREACHABLE(bcConst.flavor = (BCConstFlavor) -1);
- UNREACHABLE(bcConst.id = -9999);
- UNREACHABLE_RETURN(bcConst);
+ {
+ UNREACHABLE(BCConst bcConst);
+ UNREACHABLE(bcConst.flavor = (BCConstFlavor)-1);
+ UNREACHABLE(bcConst.id = -9999);
+ UNREACHABLE_RETURN(bcConst);
+ }
}
Int getLocalID(
diff --git a/source/slang/check.cpp b/source/slang/check.cpp
index cbdf68bf2..65b2295cc 100644
--- a/source/slang/check.cpp
+++ b/source/slang/check.cpp
@@ -5993,7 +5993,7 @@ namespace Slang
RefPtr<Expr> visitStaticMemberExpr(StaticMemberExpr* /*expr*/)
{
SLANG_UNEXPECTED("should not occur in unchecked AST");
- UNREACHABLE_RETURN(expr);
+ UNREACHABLE_RETURN(nullptr);
}
RefPtr<Expr> lookupResultFailure(