Implements part of SE-0110. Single argument in closures will not be accepted if
there exists explicit type with a number of arguments that's not 1.
```swift
let f: (Int, Int) -> Void = { x in } // this is now an error
```
Note there's a second part of SE-0110 which could be considered additive,
which says one must add an extra pair of parens to specify a single arugment
type that is a tuple:
```swift
let g ((Int, Int)) -> Void = { y in } // y should have type (Int, Int)
```
This patch does not implement that part.
For many local values we can avoid a shadow alloca by directly
describing them with a dbg.value. This also enables precise liveness
so variables don't show up in the debugger before they are
initialized. Unfortunately this also means that values will disappear
when they are no longer needed.
This patch inserts an empty inline assembler expression depending on
the llvm::Value that is being described in the blocks dominated by it.
This uses less stack space than full shadow copies *and* allows us to
track the liveness of the variable completely. It may cause values to
be spilled onto the stack, though.
<rdar://problem/26627376>
The effect of this tiny change is that local variables will be described
by llvm.dbg.values, which will get lowered into an accurate location list
instead of a stack slot that is valid for the entire scope of the variable.
This means the debugger can now accurately track the liveness of variables
knowing exactly when they are initialized and when there values go away.
Function arguments are still kept in stack slots because (1) they are
already initialized at the function entry and (2) LLDB really needs self
to be available at all times for the expression evaluator.
This was made possible by recent advancements in LLVM such as the live
debug variables pass and various related bugfixes.
<rdar://problem/15746520>
The effect of this tiny change is that local variables will be described
by llvm.dbg.values, which will get lowered into an accurate location list
instead of a stack slot that is valid for the entire scope of the variable.
This means the debugger can now accurately track the liveness of variables
knowing exactly when they are initialized and when there values go away.
Function arguments are still kept in stack slots because (1) they are
already initialized at the function entry and (2) LLDB really needs self
to be available at all times for the expression evaluator.
This was made possible by recent advancements in LLVM such as the live
debug variables pass and various related bugfixes.
<rdar://problem/15746520>
weak copies for capture list variables. Other wise two variables with
identical names will end up in the same scope.
This fixes a crash in the compiler.
rdar://problem/24150188
SR-526