Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion llpc/translator/lib/SPIRV/SPIRVToLLVMDbgTran.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,15 @@ DINode *SPIRVToLLVMDbgTran::transTypeMember(const SPIRVExtInst *DebugInst) {
SPIRVValue *ConstVal = BM->get<SPIRVValue>(Ops[ValueIdx]);
assert(isConstantOpCode(ConstVal->getOpCode()) && "Static member must be a constant");
llvm::Value *Val = SPIRVReader->transValue(ConstVal, nullptr, nullptr);
return Builder.createStaticMemberType(Scope, Name, File, LineNo, BaseType, Flags, cast<llvm::Constant>(Val));
return Builder.createStaticMemberType(
Scope, Name, File, LineNo, BaseType, Flags,
cast<llvm::Constant>(Val)
#if !defined(LLVM_MAIN_REVISION) || LLVM_MAIN_REVISION >= 480812
// New version of the code (also handles unknown version, which we treat as latest)
,
llvm::dwarf::DW_TAG_member
#endif
);
}
uint64_t Size = getConstant(Ops[SizeIdx]);
uint64_t Alignment = 0;
Expand Down