diff options
| author | Yong He <yonghe@outlook.com> | 2022-11-02 12:12:18 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-02 12:12:18 -0700 |
| commit | 2e1c15f36b42374455228e37885bdb221f302050 (patch) | |
| tree | 57ab722b87e1ef327860e4293bad9edc53bba965 /source/slang/slang-emit-cpp.cpp | |
| parent | fb29bd32cc3404455ff92916a91c517823f486dd (diff) | |
Rework differential conformance dictionary checking. (#2483)
* Rework differential conformance dictionary checking.
* Revert space changes.
Co-authored-by: Yong He <yhe@nvidia.com>
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); |
