mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[DebugInfo] Fix recursively generating debug info for same type
Debug Info generation already has a check to stop it from generating debug info for a type with the same mangled name. However, most of the code paths in debug info generation would not add the mangled name to the cache while generation was not done. This patch fixes that so types that are in-flight don't have their debug info generated twice. rdar://142500619
This commit is contained in:
27
test/DebugInfo/embedded-recur-c-types.swift
Normal file
27
test/DebugInfo/embedded-recur-c-types.swift
Normal file
@@ -0,0 +1,27 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %{python} %utils/split_file.py -o %t %s
|
||||
|
||||
// RUN: %target-swift-frontend %t/Main.swift -g -target %target-cpu-apple-macos14 -import-bridging-header %t/BridgingHeader.h -enable-experimental-feature Embedded -wmo -emit-ir -o - | %FileCheck %s
|
||||
|
||||
// REQUIRES: swift_in_compiler
|
||||
// REQUIRES: executable_test
|
||||
// REQUIRES: OS=macosx
|
||||
// REQUIRES: embedded_stdlib
|
||||
// REQUIRES: swift_feature_Embedded
|
||||
|
||||
// BEGIN BridgingHeader.h
|
||||
#pragma once
|
||||
typedef struct S2 S2_t;
|
||||
typedef struct S1 {
|
||||
struct S2 *other;
|
||||
} S1_t;
|
||||
typedef struct S2 {
|
||||
S1_t *producer_pool;
|
||||
} S2_t;
|
||||
|
||||
// BEGIN Main.swift
|
||||
|
||||
public var v: UnsafeMutablePointer<S1_t>? = nil
|
||||
|
||||
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, {{.*}} identifier: "$eSpySo4S1_taGD"
|
||||
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, {{.*}} identifier: "$eSpySo2S2VGD"
|
||||
Reference in New Issue
Block a user