Skip to content

Commit 72cf95d

Browse files
[SPIR-V] Fix warning -Wsometimes-uninitialized (#83901)
1 parent 3b5965e commit 72cf95d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ void SPIRVEmitIntrinsics::insertAssignPtrTypeIntrs(Instruction *I) {
620620
EltTyConst = UndefValue::get(AI->getAllocatedType());
621621
else if (auto *GEP = dyn_cast<GetElementPtrInst>(I))
622622
EltTyConst = UndefValue::get(GEP->getResultElementType());
623-
else if (I->getType()->isPointerTy())
623+
else
624624
EltTyConst = UndefValue::get(IntegerType::getInt8Ty(I->getContext()));
625625

626626
buildIntrWithMD(Intrinsic::spv_assign_ptr_type, {I->getType()}, EltTyConst, I,

0 commit comments

Comments
 (0)