소스 검색

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));
       }