diff options
| author | Yong He <yonghe@outlook.com> | 2017-11-05 05:49:42 -0500 |
|---|---|---|
| committer | Yong He <yonghe@outlook.com> | 2017-11-05 05:49:42 -0500 |
| commit | ff7c46a11787ca6ecebf0a224772a41efef33fc0 (patch) | |
| tree | bff41e36c9b6843d83a5ca5e83645310be6687f3 /source/slang/ir.cpp | |
| parent | 0d250f0d49e9e29d143c5794671669ea025b357e (diff) | |
small cleanups
Diffstat (limited to 'source/slang/ir.cpp')
| -rw-r--r-- | source/slang/ir.cpp | 4 |
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; } |
