Skip to content

Commit cae1109

Browse files
aratajewsys_zuul
authored andcommitted
Always set a name for StructTypes
Change-Id: I390ea15abe6283edaaab2aa562eca40c087f143e
1 parent 211eaf0 commit cae1109

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1641,7 +1641,10 @@ SPIRVToLLVM::transType(SPIRVType *T) {
16411641
}
16421642
case OpTypeStruct: {
16431643
auto ST = static_cast<SPIRVTypeStruct *>(T);
1644-
auto *pStructTy = StructType::create(*Context, ST->getName());
1644+
auto Name = ST->getName();
1645+
if (Name.empty())
1646+
Name = "structtype";
1647+
auto *pStructTy = StructType::create(*Context, Name);
16451648
mapType(ST, pStructTy);
16461649
SmallVector<Type *, 4> MT;
16471650
for (size_t I = 0, E = ST->getMemberCount(); I != E; ++I)

0 commit comments

Comments
 (0)