diff options
Diffstat (limited to 'source/slang/emit.cpp')
| -rw-r--r-- | source/slang/emit.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 5a59674f5..d2f932ebf 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -375,6 +375,11 @@ struct EmitVisitor : context(context) {} + Session* getSession() + { + return context->shared->entryPoint->compileRequest->mSession; + } + // Low-level emit logic void emitRawTextSpan(char const* textBegin, char const* textEnd) @@ -2308,9 +2313,9 @@ struct EmitVisitor emitTokenWithLocation(litExpr->token); break; } - if(type->Equals(ExpressionType::GetInt())) + if(type->Equals(getSession()->getIntType())) {} - else if(type->Equals(ExpressionType::GetUInt())) + else if(type->Equals(getSession()->getUIntType())) { suffix = "u"; } @@ -2330,9 +2335,9 @@ struct EmitVisitor emitTokenWithLocation(litExpr->token); break; } - if(type->Equals(ExpressionType::GetFloat())) + if(type->Equals(getSession()->getFloatType())) {} - else if(type->Equals(ExpressionType::getDoubleType())) + else if(type->Equals(getSession()->getDoubleType())) { suffix = "l"; } |
