Skip to content

Commit

Permalink
Add new argument to createStaticMemberType
Browse files Browse the repository at this point in the history
Makes llpc compatible with the change in
llvm/llvm-project#72234
  • Loading branch information
Flakebi committed Nov 15, 2023
1 parent 59f30aa commit 3c3e084
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion llpc/translator/lib/SPIRV/SPIRVToLLVMDbgTran.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,12 @@ 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

0 comments on commit 3c3e084

Please sign in to comment.