about summary refs log tree commit diff
path: root/src/test/codegen/async-fn-debug.rs
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2022-01-19 17:56:53 +0100
committerMichael Woerister <michaelwoerister@posteo>2022-02-01 10:39:40 +0100
commitfd7557b7ee454058fff84b556892adbef89f7d52 (patch)
tree667e850a23877f30ade7c45f4e92a8959d24bc9c /src/test/codegen/async-fn-debug.rs
parent0bcacb391b28460f5a50fd627f01f670dfcfc7cc (diff)
downloadrust-fd7557b7ee454058fff84b556892adbef89f7d52.tar.gz
rust-fd7557b7ee454058fff84b556892adbef89f7d52.zip
debuginfo: Make sure that type names for closure and generator environments are unique in debuginfo.
Before this change, closure/generator environments coming from different
instantiations of the same generic function were all assigned the same
name even though they were distinct types with potentially different data
layout. Now we append the generic arguments of the originating function
to the type name.

This commit also emits '{closure_env#0}' as the name of these types in
order to disambiguate them from the accompanying closure function
'{closure#0}'. Previously both were assigned the same name.
Diffstat (limited to 'src/test/codegen/async-fn-debug.rs')
-rw-r--r--src/test/codegen/async-fn-debug.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/codegen/async-fn-debug.rs b/src/test/codegen/async-fn-debug.rs
index f456f7ffc0f..8fbd2765fd7 100644
--- a/src/test/codegen/async-fn-debug.rs
+++ b/src/test/codegen/async-fn-debug.rs
@@ -17,7 +17,7 @@ async fn async_fn_test() {
 // FIXME: No way to reliably check the filename.
 
 // CHECK-DAG:  [[ASYNC_FN:!.*]] = !DINamespace(name: "async_fn_test"
-// CHECK-DAG:  [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "{async_fn#0}", scope: [[ASYNC_FN]]
+// CHECK-DAG:  [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "{async_fn_env#0}", scope: [[ASYNC_FN]]
 // CHECK:      [[VARIANT:!.*]] = !DICompositeType(tag: DW_TAG_variant_part, scope: [[ASYNC_FN]],
 // CHECK-NOT:  flags: DIFlagArtificial
 // CHECK-SAME: discriminator: [[DISC:![0-9]*]]