diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ir-util.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/slang/slang-ir-util.cpp b/source/slang/slang-ir-util.cpp index a1d043dff..9b852b803 100644 --- a/source/slang/slang-ir-util.cpp +++ b/source/slang/slang-ir-util.cpp @@ -719,6 +719,30 @@ void getTypeNameHint(StringBuilder& sb, IRInst* type) case kIROp_IntLit: sb << as<IRIntLit>(type)->getValue(); break; + case kIROp_BoolLit: + sb << (as<IRBoolLit>(type)->getValue() ? "true" : "false"); + break; + case kIROp_FloatLit: + sb << as<IRFloatLit>(type)->getValue(); + break; + case kIROp_StringLit: + { + auto stringLit = as<IRStringLit>(type); + sb << "\""; + sb << stringLit->getStringSlice(); + sb << "\""; + } + break; + case kIROp_VoidLit: + sb << "void"; + break; + case kIROp_PtrLit: + { + auto ptrLit = as<IRPtrLit>(type); + sb << "ptr_"; + sb << (UInt64)ptrLit->getValue(); + } + break; default: if (auto decor = type->findDecoration<IRNameHintDecoration>()) sb << decor->getName(); |
