diff options
| author | Yong He <yonghe@outlook.com> | 2025-03-19 11:44:04 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-19 11:44:04 -0700 |
| commit | 4eb7a27ac4532a49b9d383d2b0d80bc0ec317b4c (patch) | |
| tree | 3219e185674c04423e3306437e2a31223fadeb49 /source/slang/slang-ir-lower-reinterpret.cpp | |
| parent | eee974d74617944ca2b6f6ac424e98a12a51b82c (diff) | |
Fix reinterpret and bitcast and generic arg parsing. (#6627)
* Fix reinterpret and bitcast.
* Fix warning.
* Fix.
* Fix.
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-lower-reinterpret.cpp')
| -rw-r--r-- | source/slang/slang-ir-lower-reinterpret.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/source/slang/slang-ir-lower-reinterpret.cpp b/source/slang/slang-ir-lower-reinterpret.cpp index 88c288f28..6624b5f1a 100644 --- a/source/slang/slang-ir-lower-reinterpret.cpp +++ b/source/slang/slang-ir-lower-reinterpret.cpp @@ -61,10 +61,8 @@ struct ReinterpretLoweringContext auto fromType = operand->getDataType(); auto toType = inst->getDataType(); SlangInt fromTypeSize = getAnyValueSize(fromType); - bool cantPack = false; if (fromTypeSize < 0) { - cantPack = true; sink->diagnose( inst->sourceLoc, Slang::Diagnostics::typeCannotBePackedIntoAnyValue, @@ -73,22 +71,11 @@ struct ReinterpretLoweringContext SlangInt toTypeSize = getAnyValueSize(toType); if (toTypeSize < 0) { - cantPack = true; sink->diagnose( inst->sourceLoc, Slang::Diagnostics::typeCannotBePackedIntoAnyValue, toType); } - if (fromTypeSize != toTypeSize && !cantPack && !as<IRExtractExistentialType>(fromType)) - { - sink->diagnose( - inst->sourceLoc, - Slang::Diagnostics::notEqualReinterpretCastSize, - fromType, - fromTypeSize, - toType, - toTypeSize); - } SlangInt anyValueSize = Math::Max(fromTypeSize, toTypeSize); IRBuilder builder(module); |
