swift
09d24645 - SILGen: insert an `end_lifetime` in the throw-branch of a `Builtin.emplace`

Commit
33 days ago
SILGen: insert an `end_lifetime` in the throw-branch of a `Builtin.emplace` When the called closure throws an error, it needs to clean up the buffer. This means that the buffer is uninitialized at this point. We need an `end_lifetime` so that the move-only checker doesn't insert a wrong `destroy_addr` because it thinks that the buffer is initialized. Fixes a mis-compile. rdar://151461109
Author
Committer
Parents
  • lib
    • SILGen
      • File
        SILGenBuiltin.cpp
    • SILOptimizer/Mandatory
      • File
        MoveOnlyUtils.cpp
  • test/stdlib
    • File
      InlineArray.swift