summaryrefslogtreecommitdiff
path: root/source/slang/ir-legalize-types.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/ir-legalize-types.cpp')
-rw-r--r--source/slang/ir-legalize-types.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/slang/ir-legalize-types.cpp b/source/slang/ir-legalize-types.cpp
index 141799a06..eb22da967 100644
--- a/source/slang/ir-legalize-types.cpp
+++ b/source/slang/ir-legalize-types.cpp
@@ -71,7 +71,7 @@ LegalVal LegalVal::implicitDeref(LegalVal const& val)
LegalVal LegalVal::getImplicitDeref()
{
SLANG_ASSERT(flavor == Flavor::implicitDeref);
- return obj.As<ImplicitDerefVal>()->val;
+ return as<ImplicitDerefVal>(obj)->val;
}
@@ -1017,7 +1017,7 @@ static LegalVal legalizeInst(
RefPtr<VarLayout> findVarLayout(IRInst* value)
{
if (auto layoutDecoration = value->findDecoration<IRLayoutDecoration>())
- return layoutDecoration->getLayout()->dynamicCast<VarLayout>();
+ return dynamicCast<VarLayout>(layoutDecoration->getLayout());
return nullptr;
}