Skip to content

Commit d99e6a7

Browse files
committed
Add new argument to debug builder
Makes llpc compatible with the change in llvm/llvm-project#72011
1 parent 1538fd1 commit d99e6a7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

llpc/translator/lib/SPIRV/SPIRVToLLVMDbgTran.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,11 @@ DICompositeType *SPIRVToLLVMDbgTran::transTypeComposite(const SPIRVExtInst *Debu
328328
switch (Ops[TagIdx]) {
329329
case SPIRVDebug::Class:
330330
CT = Builder.createClassType(ParentScope, Name, File, LineNo, Size, Align, 0, Flags, DerivedFrom,
331-
DINodeArray() /*elements*/, nullptr /*VTableHolder*/, nullptr /*TemplateParams*/,
332-
Identifier);
331+
DINodeArray() /*elements*/,
332+
#if !defined(LLVM_MAIN_REVISION) || LLVM_MAIN_REVISION >= 480873
333+
0 /*RunTimeLang*/,
334+
#endif
335+
nullptr /*VTableHolder*/, nullptr /*TemplateParams*/, Identifier);
333336
break;
334337
case SPIRVDebug::Structure:
335338
CT = Builder.createStructType(ParentScope, Name, File, LineNo, Size, Align, Flags, DerivedFrom,
@@ -415,6 +418,9 @@ DINode *SPIRVToLLVMDbgTran::transTypeEnum(const SPIRVExtInst *DebugInst) {
415418
if (!isa<OpTypeVoid>(E))
416419
UnderlyingType = transDebugInst<DIType>(static_cast<SPIRVExtInst *>(E));
417420
return Builder.createEnumerationType(Scope, Name, File, LineNo, SizeInBits, AlignInBits, Enumerators, UnderlyingType,
421+
#if !defined(LLVM_MAIN_REVISION) || LLVM_MAIN_REVISION >= 480873
422+
0 /*RunTimeLang*/,
423+
#endif
418424
"", UnderlyingType);
419425
}
420426

0 commit comments

Comments
 (0)