瀏覽代碼

merge two cases

Jaebaek Seo 6 年之前
父節點
當前提交
f9914c2f92
共有 1 個文件被更改,包括 2 次插入5 次删除
  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));
       }