summaryrefslogtreecommitdiffstats
path: root/source/slang/ir.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2017-11-05 05:49:42 -0500
committerYong He <yonghe@outlook.com>2017-11-05 05:49:42 -0500
commitff7c46a11787ca6ecebf0a224772a41efef33fc0 (patch)
treebff41e36c9b6843d83a5ca5e83645310be6687f3 /source/slang/ir.cpp
parent0d250f0d49e9e29d143c5794671669ea025b357e (diff)
small cleanups
Diffstat (limited to 'source/slang/ir.cpp')
-rw-r--r--source/slang/ir.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/slang/ir.cpp b/source/slang/ir.cpp
index 04569771a..ab961a159 100644
--- a/source/slang/ir.cpp
+++ b/source/slang/ir.cpp
@@ -562,11 +562,13 @@ namespace Slang
IRValue * IRBuilder::getTypeVal(IRType * type)
{
- auto irValue = createValue<IRDeclRef>(
+ auto irValue = createValue<IRValue>(
this,
kIROp_TypeType,
nullptr);
irValue->type = type;
+ if (auto typetype = dynamic_cast<TypeType*>(type))
+ irValue->type = typetype->type;
return irValue;
}