mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 19:06:02 +03:00
This commit is contained in:
parent
c7d7894045
commit
d4858cfbcb
2 changed files with 17 additions and 6 deletions
|
@ -135,6 +135,8 @@ DIScope DIBuilder::GetSymbolScope(Dsymbol *s) {
|
||||||
return EmitSubProgram(fd);
|
return EmitSubProgram(fd);
|
||||||
} else if (auto ns = parent->isNspace()) {
|
} else if (auto ns = parent->isNspace()) {
|
||||||
return EmitNamespace(ns, ns->toChars());
|
return EmitNamespace(ns, ns->toChars());
|
||||||
|
} else if (auto fwd = parent->isForwardingScopeDsymbol()) {
|
||||||
|
return GetSymbolScope(fwd);
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm_unreachable("Unhandled parent");
|
llvm_unreachable("Unhandled parent");
|
||||||
|
|
|
@ -52,13 +52,22 @@ void templatedFoo(int N)()
|
||||||
|
|
||||||
mixin template Mixin(T)
|
mixin template Mixin(T)
|
||||||
{
|
{
|
||||||
T mixedInField;
|
// test https://github.com/ldc-developers/ldc/issues/2937 while at it
|
||||||
void mixedInFoo()
|
static foreach (i; 0 .. 1)
|
||||||
{
|
{
|
||||||
// CDB: bp `scopes_cdb.d:58`
|
static struct MixedInStruct { T field; }
|
||||||
|
MixedInStruct mixedInField;
|
||||||
|
void mixedInFoo()
|
||||||
|
{
|
||||||
|
MixedInStruct local;
|
||||||
|
// CDB: bp `scopes_cdb.d:63`
|
||||||
// CDB: g
|
// CDB: g
|
||||||
// CHECK-G: !scopes_cdb.S.mixedInFoo+
|
// CHECK-G: !scopes_cdb.S.mixedInFoo+
|
||||||
// CHECK-GC: !scopes_cdb::S::mixedInFoo+
|
// CHECK-GC: !scopes_cdb::S::mixedInFoo+
|
||||||
|
// CDB: dv /t
|
||||||
|
// CHECK-G: struct scopes_cdb.S.MixedInStruct local =
|
||||||
|
// CHECK-GC: struct scopes_cdb::S::MixedInStruct local =
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +92,7 @@ void test()
|
||||||
T[N] field;
|
T[N] field;
|
||||||
void foo()
|
void foo()
|
||||||
{
|
{
|
||||||
// CDB: bp `scopes_cdb.d:86`
|
// CDB: bp `scopes_cdb.d:95`
|
||||||
// CDB: g
|
// CDB: g
|
||||||
// CHECK-G: !scopes_cdb.test.TemplatedNestedStruct!(S, 3).foo+
|
// CHECK-G: !scopes_cdb.test.TemplatedNestedStruct!(S, 3).foo+
|
||||||
// CHECK-GC: !scopes_cdb::test::TemplatedNestedStruct<S, 3>::foo+
|
// CHECK-GC: !scopes_cdb::test::TemplatedNestedStruct<S, 3>::foo+
|
||||||
|
@ -98,7 +107,7 @@ void test()
|
||||||
int field;
|
int field;
|
||||||
void foo()
|
void foo()
|
||||||
{
|
{
|
||||||
// CDB: bp `scopes_cdb.d:101`
|
// CDB: bp `scopes_cdb.d:110`
|
||||||
// CDB: g
|
// CDB: g
|
||||||
// CHECK-G: !scopes_cdb.test.NestedStruct.foo+
|
// CHECK-G: !scopes_cdb.test.NestedStruct.foo+
|
||||||
// CHECK-GC: !scopes_cdb::test::NestedStruct::foo+
|
// CHECK-GC: !scopes_cdb::test::NestedStruct::foo+
|
||||||
|
@ -108,7 +117,7 @@ void test()
|
||||||
NestedStruct ns;
|
NestedStruct ns;
|
||||||
ns.foo();
|
ns.foo();
|
||||||
|
|
||||||
// CDB: bp `scopes_cdb.d:111`
|
// CDB: bp `scopes_cdb.d:120`
|
||||||
// CDB: g
|
// CDB: g
|
||||||
// CDB: dv /t
|
// CDB: dv /t
|
||||||
// CHECK-G: struct scopes_cdb.S s =
|
// CHECK-G: struct scopes_cdb.S s =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue