Skip to content

Commit 5ca1f2a

Browse files
authored
[SPIR-V] Partial revert of d40eb0a (#74755)
This part of the #74660 patch was incorrect and shouldn't have been changed since this usage of `isOpaque()` is not one of `PointerType`'s functions.
1 parent bdcb841 commit 5ca1f2a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,9 @@ SPIRVType *SPIRVGlobalRegistry::createSPIRVType(
690690
return getOpTypeArray(Ty->getArrayNumElements(), El, MIRBuilder, EmitIR);
691691
}
692692
if (auto SType = dyn_cast<StructType>(Ty)) {
693-
return getOpTypeOpaque(SType, MIRBuilder);
693+
if (SType->isOpaque())
694+
return getOpTypeOpaque(SType, MIRBuilder);
695+
return getOpTypeStruct(SType, MIRBuilder, EmitIR);
694696
}
695697
if (auto FType = dyn_cast<FunctionType>(Ty)) {
696698
SPIRVType *RetTy = findSPIRVType(FType->getReturnType(), MIRBuilder);

0 commit comments

Comments
 (0)