Skip to content

[SR-11803] Don't inject "willThrow" hooks before rethrow propagation branches #54213

@CodaFi

Description

@CodaFi
Previous ID SR-11803
Radar None
Original Reporter @CodaFi
Type Bug
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, StarterBug
Assignee mkita (JIRA)
Priority Medium

md5: 5bcb9cad814df2dd1cc8124f822c3e34

Issue Description:

LLDB has a magic symbol it's looking for in order to implement Swift exception breakpoints. That symbol is "willThrow" in SIL and it's implemented with "swift_willThrow" in IRGen. The trouble is that we're a little too aggressive about emitting calls to this hook. Joe has already identified the places we don't need it in #13585

Step one is to take that PR, rebase it, and rerun the tests to make sure everything is good. The real task is to take that pull request and do the opposite where we propagate Objective-C errors into Swift. The logic for this sits in SILGenForeignError.cpp. There should also be an IRGen test to make sure we emit the right set of branches, cleanups, and error propagation code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions