Skip to content
Snippets Groups Projects
  • John McCall's avatar
    5d6757ef
    Forward ns_consumed delegate arguments with a move. · 5d6757ef
    John McCall authored
    StartFunction enters a release cleanup for ns_consumed arguments in
    ARC, so we need to balance that somehow.  We could teach StartFunction
    that it's emitting a delegating function, so that the cleanup is
    unnecessary, but that would be invasive and somewhat fraught.  We could
    balance the consumed argument with an extra retain, but clearing the
    original variable should be easier to optimize and avoid some extra work
    at -O0.  And there shouldn't be any difference as long as nothing else
    uses the argument, which should always be true for the places we emit
    delegate arguments.
    
    Fixes PR 27887.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287291 91177308-0d34-0410-b5e6-96231b3b80d8
    5d6757ef
    History
    Forward ns_consumed delegate arguments with a move.
    John McCall authored
    StartFunction enters a release cleanup for ns_consumed arguments in
    ARC, so we need to balance that somehow.  We could teach StartFunction
    that it's emitting a delegating function, so that the cleanup is
    unnecessary, but that would be invasive and somewhat fraught.  We could
    balance the consumed argument with an extra retain, but clearing the
    original variable should be easier to optimize and avoid some extra work
    at -O0.  And there shouldn't be any difference as long as nothing else
    uses the argument, which should always be true for the places we emit
    delegate arguments.
    
    Fixes PR 27887.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287291 91177308-0d34-0410-b5e6-96231b3b80d8
Code owners
Assign users and groups as approvers for specific file changes. Learn more.