Pārlūkot izejas kodu

merge two cases

Jaebaek Seo 6 gadi atpakaļ
vecāks
revīzija
f9914c2f92
1 mainītis faili ar 2 papildinājumiem un 5 dzēšanām
  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));
       }