Browse Source

merge two cases

Jaebaek Seo 6 năm trước cách đây
mục cha
commit
f9914c2f92
1 tập tin đã thay đổi với 2 bổ sung5 xóa
  1. 2 5
      tools/clang/lib/SPIRV/SpirvEmitter.cpp

+ 2 - 5
tools/clang/lib/SPIRV/SpirvEmitter.cpp

@@ -9096,11 +9096,8 @@ SpirvConstant *SpirvEmitter::getValueZero(QualType type) {
   {
     QualType scalarType = {};
     if (isScalarType(type, &scalarType)) {
-      if (scalarType->isSignedIntegerType()) {
-        return spvBuilder.getConstantInt(scalarType, llvm::APInt(32, 0));
-      }
-
-      if (scalarType->isUnsignedIntegerType()) {
+      if (scalarType->isSignedIntegerType() ||
+          scalarType->isUnsignedIntegerType()) {
         return spvBuilder.getConstantInt(scalarType, llvm::APInt(32, 0));
       }