mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 02:45:25 +03:00
Fix LLVM 3.4 change to DIBuilder.createFunction().
DIBuilder.createFunction() now requires the return type to be of subroutine type and consequently needs a DICompositeType.
This commit is contained in:
parent
6e57b6c213
commit
1af71fa536
1 changed files with 12 additions and 2 deletions
|
@ -525,7 +525,12 @@ llvm::DISubprogram DtoDwarfSubProgram(FuncDeclaration* fd)
|
|||
llvm::SmallVector<llvm::Value*, 16> Elts;
|
||||
Elts.push_back(dwarfTypeDescription(retType, NULL));
|
||||
llvm::DIArray EltTypeArray = gIR->dibuilder.getOrCreateArray(Elts);
|
||||
llvm::DIType DIFnType = gIR->dibuilder.createSubroutineType(file, EltTypeArray);
|
||||
#if LDC_LLVM_VER >= 304
|
||||
llvm::DICompositeType
|
||||
#else
|
||||
llvm::DIType
|
||||
#endif
|
||||
DIFnType = gIR->dibuilder.createSubroutineType(file, EltTypeArray);
|
||||
|
||||
// FIXME: duplicates ?
|
||||
return gIR->dibuilder.createFunction(
|
||||
|
@ -562,7 +567,12 @@ llvm::DISubprogram DtoDwarfSubProgramInternal(const char* prettyname, const char
|
|||
llvm::SmallVector<llvm::Value*, 1> Elts;
|
||||
Elts.push_back(llvm::DIType(NULL));
|
||||
llvm::DIArray EltTypeArray = gIR->dibuilder.getOrCreateArray(Elts);
|
||||
llvm::DIType DIFnType = gIR->dibuilder.createSubroutineType(file, EltTypeArray);
|
||||
#if LDC_LLVM_VER >= 304
|
||||
llvm::DICompositeType
|
||||
#else
|
||||
llvm::DIType
|
||||
#endif
|
||||
DIFnType = gIR->dibuilder.createSubroutineType(file, EltTypeArray);
|
||||
|
||||
// FIXME: duplicates ?
|
||||
return gIR->dibuilder.createFunction(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue