diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-08-20 06:06:34 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-19 15:06:34 -0700 |
| commit | f77a5ac9d1547a4394bba4ab8e94d905972c79b7 (patch) | |
| tree | 0d66b3c8386d8cb1e75970c93914fe2a60f03c61 /source/slang/slang-ir.cpp | |
| parent | 453683bf44f2112719802eaac2b332d49eebd640 (diff) | |
Remove using SpvStorageClass values casted into AddressSpace values (#4861)
* Remove using SpvStorageClass values casted into AddressSpace values
Also removes support for specific storage classes in __target_intrinsic snippets
* remove SLANG_RETURN_NEVER macro
* squash warnings
* Make nonexhaustive switch statement error on gcc
* Add SLANG_EXHAUSTIVE_SWITCH_BEGIN/END macros
---------
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 1441b0567..e0769686c 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -2881,9 +2881,9 @@ namespace Slang operands); } - IRPtrType* IRBuilder::getPtrType(IROp op, IRType* valueType, IRIntegerValue addressSpace) + IRPtrType* IRBuilder::getPtrType(IROp op, IRType* valueType, AddressSpace addressSpace) { - return (IRPtrType*)getPtrType(op, valueType, getIntValue(getUInt64Type(), addressSpace)); + return (IRPtrType*)getPtrType(op, valueType, getIntValue(getUInt64Type(), static_cast<IRIntegerValue>(addressSpace))); } IRPtrType* IRBuilder::getPtrType(IROp op, IRType* valueType, IRInst* addressSpace) @@ -4530,7 +4530,7 @@ namespace Slang IRGlobalVar* IRBuilder::createGlobalVar( IRType* valueType, - IRIntegerValue addressSpace) + AddressSpace addressSpace) { auto ptrType = getPtrType(kIROp_PtrType, valueType, addressSpace); IRGlobalVar* globalVar = createInst<IRGlobalVar>( @@ -4807,7 +4807,7 @@ namespace Slang IRVar* IRBuilder::emitVar( IRType* type, - IRIntegerValue addressSpace) + AddressSpace addressSpace) { auto allocatedType = getPtrType(kIROp_PtrType, type, addressSpace); auto inst = createInst<IRVar>( |
