mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-05 01:20:51 +03:00
Return type must be of type DIComposite.
This commit is contained in:
parent
c8d98ad31c
commit
dce378ba75
1 changed files with 7 additions and 1 deletions
|
@ -558,6 +558,12 @@ llvm::DISubprogram DtoDwarfSubProgramInternal(const char* prettyname, const char
|
||||||
|
|
||||||
llvm::DIFile file(DtoDwarfFile(Loc(gIR->dmodule, 0)));
|
llvm::DIFile file(DtoDwarfFile(Loc(gIR->dmodule, 0)));
|
||||||
|
|
||||||
|
// Create "dummy" subroutine type for the return type
|
||||||
|
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);
|
||||||
|
|
||||||
// FIXME: duplicates ?
|
// FIXME: duplicates ?
|
||||||
return gIR->dibuilder.createFunction(
|
return gIR->dibuilder.createFunction(
|
||||||
llvm::DIDescriptor(file), // context
|
llvm::DIDescriptor(file), // context
|
||||||
|
@ -565,7 +571,7 @@ llvm::DISubprogram DtoDwarfSubProgramInternal(const char* prettyname, const char
|
||||||
mangledname, // linkage name
|
mangledname, // linkage name
|
||||||
file, // file
|
file, // file
|
||||||
0, // line no
|
0, // line no
|
||||||
llvm::DIType(NULL), // return type. TODO: fill it up
|
DIFnType, // return type. TODO: fill it up
|
||||||
true, // is local to unit
|
true, // is local to unit
|
||||||
true // isdefinition
|
true // isdefinition
|
||||||
#if LDC_LLVM_VER >= 301
|
#if LDC_LLVM_VER >= 301
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue