mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-23 08:13:13 +01:00
[svn r206] Fixed some interfaceInfo related issues, closes #44
This commit is contained in:
@@ -434,9 +434,6 @@ void DtoConstInitClass(ClassDeclaration* cd)
|
||||
if (cd->ir.initialized) return;
|
||||
cd->ir.initialized = true;
|
||||
|
||||
if (cd->isInterfaceDeclaration())
|
||||
return; // nothing to do
|
||||
|
||||
Logger::println("DtoConstInitClass(%s): %s", cd->toPrettyChars(), cd->loc.toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
@@ -463,15 +460,10 @@ void DtoConstInitClass(ClassDeclaration* cd)
|
||||
std::vector<llvm::Constant*> fieldinits;
|
||||
|
||||
// first field is always the vtable
|
||||
if (cd->isAbstract())
|
||||
if (cd->isAbstract() || cd->isInterfaceDeclaration())
|
||||
{
|
||||
fieldinits.push_back(
|
||||
llvm::ConstantPointerNull::get(
|
||||
getPtrToType(
|
||||
ts->ir.vtblType->get()
|
||||
)
|
||||
)
|
||||
);
|
||||
const llvm::Type* ptrTy = getPtrToType(ts->ir.vtblType->get());
|
||||
fieldinits.push_back(llvm::Constant::getNullValue(ptrTy));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -292,8 +292,6 @@ tango/lib/compiler/llvmdc/mem.d
|
||||
tango/lib/compiler/llvmdc/memory.d
|
||||
tango/lib/compiler/llvmdc/monitor.c
|
||||
tango/lib/compiler/llvmdc/qsort2.d
|
||||
tango/lib/compiler/llvmdc/std
|
||||
tango/lib/compiler/llvmdc/std/intrinsic.d
|
||||
tango/lib/compiler/llvmdc/switch.d
|
||||
tango/lib/compiler/llvmdc/typeinfo
|
||||
tango/lib/compiler/llvmdc/typeinfo/ti_AC.d
|
||||
@@ -1029,3 +1027,5 @@ test/vararg5.d
|
||||
test/virtcall.d
|
||||
test/with1.d
|
||||
tester.d
|
||||
tests
|
||||
tests/findregressions.d
|
||||
|
||||
Reference in New Issue
Block a user