summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source/slang/slang-ir.cpp4
-rw-r--r--source/slang/slang-parser.cpp10
2 files changed, 7 insertions, 7 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp
index c12ad0f68..f0e7773c6 100644
--- a/source/slang/slang-ir.cpp
+++ b/source/slang/slang-ir.cpp
@@ -5982,7 +5982,7 @@ namespace Slang
auto inst = createInst<IRInst>(
this,
kIROp_SizeOf,
- getUIntType(),
+ getIntType(),
sizedType);
addInst(inst);
return inst;
@@ -5994,7 +5994,7 @@ namespace Slang
auto inst = createInst<IRInst>(
this,
kIROp_AlignOf,
- getUIntType(),
+ getIntType(),
sizedType);
addInst(inst);
return inst;
diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp
index 06d470a5f..0c65ca85e 100644
--- a/source/slang/slang-parser.cpp
+++ b/source/slang/slang-parser.cpp
@@ -6403,11 +6403,11 @@ namespace Slang
{
// We could have a type or a variable or an expression
SizeOfExpr* sizeOfExpr = parser->astBuilder->create<SizeOfExpr>();
-
+
parser->ReadMatchingToken(TokenType::LParent);
- // The return type is always a UInt
- sizeOfExpr->type = parser->astBuilder->getUIntType();
+ // The return type is always a Int
+ sizeOfExpr->type = parser->astBuilder->getIntType();
sizeOfExpr->value = parser->ParseExpression();
@@ -6423,8 +6423,8 @@ namespace Slang
parser->ReadMatchingToken(TokenType::LParent);
- // The return type is always a UInt
- alignOfExpr->type = parser->astBuilder->getUIntType();
+ // The return type is always a Int
+ alignOfExpr->type = parser->astBuilder->getIntType();
alignOfExpr->value = parser->ParseExpression();