Skip to content

[SR-13223] Fix C++ debug type deserialization. #55663

Open
@zoecarver

Description

@zoecarver
Previous ID SR-13223
Radar rdar://problem/83423221
Original Reporter @zoecarver
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CxxInterop
Assignee None
Priority Medium

md5: e7f23df26e35dbbf4e8ddc5f9c5cfec4

Issue Description:

When we try to emit debug info for C++ types we crash because we can't deserialize them.

Here's an example program (that crashes):

// RUN: swift-frontend -enable-cxx-interop -I %S/Inputs %s -emit-ir -g

// IntBox.cpp

struct IntBox { int x; };

// Main.swift

func blackHole<T>(_ x : T) -> T { x }

public func create(_ x : Int32) -> IntBox { IntBox(x: x) }

public func test() {
  let f = create(Int32.random(in: 0..<6))
  _  = blackHole(f)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.c++ interopFeature: Interoperability with C++compilerThe Swift compiler itself

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions