diff --git a/lib/SPIRV/LLVMToSPIRVDbgTran.cpp b/lib/SPIRV/LLVMToSPIRVDbgTran.cpp index 3f141f315..53c62b545 100644 --- a/lib/SPIRV/LLVMToSPIRVDbgTran.cpp +++ b/lib/SPIRV/LLVMToSPIRVDbgTran.cpp @@ -495,6 +495,8 @@ SPIRVWord LLVMToSPIRVDbgTran::mapDebugFlags(DINode::DIFlags DFlags) { if (BM->getDebugInfoEIS() == SPIRVEIS_NonSemantic_Shader_DebugInfo_200) if (DFlags & DINode::FlagBitField) Flags |= SPIRVDebug::FlagBitField; + if (DFlags & DINode::FlagEnumClass) + Flags |= SPIRVDebug::FlagIsEnumClass; return Flags; } diff --git a/lib/SPIRV/SPIRVToLLVMDbgTran.cpp b/lib/SPIRV/SPIRVToLLVMDbgTran.cpp index 7cf472142..bbca25f33 100644 --- a/lib/SPIRV/SPIRVToLLVMDbgTran.cpp +++ b/lib/SPIRV/SPIRVToLLVMDbgTran.cpp @@ -805,7 +805,7 @@ DINode *SPIRVToLLVMDbgTran::transTypeEnum(const SPIRVExtInst *DebugInst) { UnderlyingType = transDebugInst(static_cast(E)); return getDIBuilder(DebugInst).createEnumerationType( Scope, Name, File, LineNo, SizeInBits, AlignInBits, Enumerators, - UnderlyingType, "", UnderlyingType); + UnderlyingType, "", Flags & SPIRVDebug::FlagIsEnumClass); } }