Skip to content

Commit 10408fd

Browse files
committed
Disable new test fail_compilation/test20859.d for LDC
1 parent a8b4dda commit 10408fd

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

dmd/aggregate.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,11 @@ class ClassDeclaration : public AggregateDeclaration
307307

308308
void addObjcSymbols(ClassDeclarations *classes, ClassDeclarations *categories) override final;
309309

310+
#if !IN_LLVM
310311
// Back end
311312
Dsymbol *vtblsym;
312313
Dsymbol *vtblSymbol();
314+
#endif
313315

314316
ClassDeclaration *isClassDeclaration() override final { return (ClassDeclaration *)this; }
315317
void accept(Visitor *v) override { v->visit(this); }

dmd/dclass.d

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,8 @@ version (IN_LLVM) {} else
922922
.objc.addSymbols(this, classes, categories);
923923
}
924924

925+
version (IN_LLVM) { /* not needed */ } else
926+
{
925927
// Back end
926928
Dsymbol vtblsym;
927929

@@ -939,6 +941,7 @@ version (IN_LLVM) {} else
939941
}
940942
return vtblsym;
941943
}
944+
}
942945

943946
extern (D) final bool isErrorException()
944947
{

gen/llvmhelpers.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,13 +1491,6 @@ DValue *DtoSymbolAddress(const Loc &loc, Type *type, Declaration *decl) {
14911491
LLValue *m = DtoResolveTypeInfo(tid);
14921492
return new DImValue(type, m);
14931493
}
1494-
// special vtbl symbol, used by LDC as alias to the actual vtbl (with
1495-
// different type and mangled name)
1496-
if (vd->isClassMember() && vd == vd->isClassMember()->vtblsym) {
1497-
Logger::println("vtbl symbol");
1498-
auto cd = vd->isClassMember();
1499-
return new DLValue(type, getIrAggr(cd)->getVtblSymbol());
1500-
}
15011494
// nested variable
15021495
if (vd->nestedrefs.length) {
15031496
Logger::println("nested variable");

tests/dmd/fail_compilation/test20859.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/** DISABLED: LDC // succeeds, as LDC doesn't add a (undocumented) magic __vtbl member variable (unused `ClassDeclaration.vtblSymbol()`)
22
TEST_OUTPUT:
33
---
44
fail_compilation/test20859.d(8): Error: variable `test20859.ICE.__vtbl` conflicts with variable `test20859.ICE.__vtbl` at fail_compilation/test20859.d(10)

0 commit comments

Comments
 (0)