diff options
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
| -rw-r--r-- | source/slang/slang-lower-to-ir.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index e2689ffd1..ac02e1dfd 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -4211,7 +4211,7 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo> // This is a constraint on a global generic type parameters, // and so it should lower as a parameter of its own. - auto inst = getBuilder()->emitGlobalGenericParam(); + auto inst = getBuilder()->emitGlobalGenericWitnessTableParam(); addLinkageDecoration(context, inst, decl); return LoweredValInfo::simple(inst); } @@ -4227,11 +4227,21 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo> LoweredValInfo visitGlobalGenericParamDecl(GlobalGenericParamDecl* decl) { - auto inst = getBuilder()->emitGlobalGenericParam(); + auto inst = getBuilder()->emitGlobalGenericTypeParam(); addLinkageDecoration(context, inst, decl); return LoweredValInfo::simple(inst); } + LoweredValInfo visitGlobalGenericValueParamDecl(GlobalGenericValueParamDecl* decl) + { + auto builder = getBuilder(); + auto type = lowerType(context, decl->type); + auto inst = builder->emitGlobalGenericParam(type); + addLinkageDecoration(context, inst, decl); + return LoweredValInfo::simple(inst); + } + + void lowerWitnessTable( IRGenContext* subContext, WitnessTable* astWitnessTable, |
