Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new parameter convention @in_cxx for non-trivial C++ classes that are passed indirectly and destructed by the caller #73019

Merged
merged 10 commits into from
Jun 27, 2024

Commits on Jun 26, 2024

  1. Add a new parameter convention @in_cxx for non-trivial C++ classes

    that are passed indirectly and destructed by the caller
    
    Fix a bug where `@in`, which indicates the callee is responsible for
    destroying the passed object, was being used to pass such classes.
    
    rdar://122707697
    ahatanaka committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    e86a0a0 View commit details
    Browse the repository at this point in the history
  2. Address feedback from @atrick and @nate-chandler

    - @in_cxx is handled the same way as @in in callers and @in_guaranteed
      in callees (except for mutation). Fix checks in various places
      accordingly.
    
    - Emit copies of @in_cxx parameters and destroy them in thunks.
    ahatanaka committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    8b63e98 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4dfb1e0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    191dc92 View commit details
    Browse the repository at this point in the history
  5. Fix mangling of @in_cxx

    'C' is already taken by @convention(c).
    ahatanaka committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    187a95b View commit details
    Browse the repository at this point in the history
  6. Add missing case

    ahatanaka committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    3d102ed View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    cf33eef View commit details
    Browse the repository at this point in the history
  8. Fix tests

    ahatanaka committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    be51347 View commit details
    Browse the repository at this point in the history
  9. Fix check strings

    ahatanaka committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    242ee1b View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4d6a47f View commit details
    Browse the repository at this point in the history