diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2023-08-07 23:38:52 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-07 08:38:52 -0700 |
| commit | 0f57c46adb0b697af80208edbc99403553766be9 (patch) | |
| tree | 727d262db612324fea7bee82f7d103c791072198 /source | |
| parent | 856086cf2ac6fb1544b5b08ffa64b2f01931d35c (diff) | |
Correct return type for emitFieldAddress (#3051)
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ir-any-value-marshalling.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/slang/slang-ir-any-value-marshalling.cpp b/source/slang/slang-ir-any-value-marshalling.cpp index 0c603d81a..35e063848 100644 --- a/source/slang/slang-ir-any-value-marshalling.cpp +++ b/source/slang/slang-ir-any-value-marshalling.cpp @@ -387,7 +387,11 @@ namespace Slang // Initialize fields to 0 to prevent downstream compiler error. for (uint32_t offset = 0; offset < (uint32_t)anyValInfo->fieldKeys.getCount(); offset++) { - auto fieldAddr = builder.emitFieldAddress(builder.getUIntType(), resultVar, anyValInfo->fieldKeys[offset]); + auto fieldAddr = builder.emitFieldAddress( + builder.getPtrType(builder.getUIntType()), + resultVar, + anyValInfo->fieldKeys[offset] + ); builder.emitStore(fieldAddr, builder.getIntValue(builder.getUIntType(), 0)); } |
