Răsfoiți Sursa

merge two cases

Jaebaek Seo 6 ani în urmă
părinte
comite
f9914c2f92
1 a modificat fișierele cu 2 adăugiri și 5 ștergeri
  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));
       }