diff options
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
| -rw-r--r-- | source/slang/slang-emit-cpp.cpp | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index dd3acff78..f62007bb0 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -7,6 +7,7 @@ #include "slang-mangled-lexer.h" #include "slang-ir-clone.h" +#include "slang-ir-util.h" #include "../compiler-core/slang-artifact-desc-util.h" @@ -80,39 +81,6 @@ static UnownedStringSlice _getTypePrefix(IROp op) } } -static IROp _getTypeStyle(IROp op) -{ - switch (op) - { - case kIROp_VoidType: - case kIROp_BoolType: - { - return op; - } - case kIROp_Int8Type: - case kIROp_Int16Type: - case kIROp_IntType: - case kIROp_UInt8Type: - case kIROp_UInt16Type: - case kIROp_UIntType: - case kIROp_Int64Type: - case kIROp_UInt64Type: - case kIROp_IntPtrType: - case kIROp_UIntPtrType: - { - // All int like - return kIROp_IntType; - } - case kIROp_HalfType: - case kIROp_FloatType: - case kIROp_DoubleType: - { - // All float like - return kIROp_FloatType; - } - default: return kIROp_Invalid; - } -} static IROp _getCType(IROp op) { @@ -912,7 +880,7 @@ void CPPSourceEmitter::_emitAnyAllDefinition(const UnownedStringSlice& funcName, IRType* retType = specOp->returnType; auto retTypeName = _getTypeName(retType); - IROp style = _getTypeStyle(elementType->getOp()); + IROp style = getTypeStyle(elementType->getOp()); const TypeDimension dim = _getTypeDimension(paramType0, false); |
