mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 00:20:40 +03:00
Fixed some problems with the addZeros forward declarations having type mismatches.
This commit is contained in:
parent
3a2e29d434
commit
4da2cf066e
5 changed files with 7 additions and 11 deletions
|
@ -421,10 +421,6 @@ void DtoDeclareClass(ClassDeclaration* cd)
|
|||
DtoTypeInfoOf(cd->type, false);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void addZeros(std::vector<llvm::Constant*>& inits, size_t pos, size_t offset); // irstruct.cpp
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// adds data fields and interface vtables to the constant initializer of class cd
|
||||
|
@ -547,6 +543,9 @@ static void init_class_vtbl_initializer(ClassDeclaration* cd)
|
|||
FuncDeclaration* fd = dsym->isFuncDeclaration();
|
||||
assert(fd);
|
||||
|
||||
// if function is abstract,
|
||||
// or class is abstract, and func has no body,
|
||||
// emit a null vtbl entry
|
||||
if (fd->isAbstract() || (cd->isAbstract() && !fd->fbody))
|
||||
{
|
||||
sinits[k] = getNullPtr(getVoidPtrType());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue