Commit Graph

7 Commits

Author SHA1 Message Date
eeckstein
29f6f01a46 Merge pull request #77763 from eeckstein/sil-printing
SIL: don't print operand types in textual SIL
2024-11-22 06:42:29 +01:00
Erik Eckstein
7cceaff5f3 SIL: don't print operand types in textual SIL
Type annotations for instruction operands are omitted, e.g.

```
  %3 = struct $S(%1, %2)
```

Operand types are redundant anyway and were only used for sanity checking in the SIL parser.

But: operand types _are_ printed if the definition of the operand value was not printed yet.
This happens:

* if the block with the definition appears after the block where the operand's instruction is located

* if a block or instruction is printed in isolation, e.g. in a debugger

The old behavior can be restored with `-Xllvm -sil-print-types`.
This option is added to many existing test files which check for operand types in their check-lines.
2024-11-21 18:49:52 +01:00
Hamish Knight
68648f74ef [CS] Use adjusted type for single curry thunks
This matches the double curry thunk logic and
ensures that the resulting autoclosure matches the
expected type of the reference, avoiding mismatches
with parent expressions.

rdar://140212823
2024-11-21 12:14:00 +00:00
Holly Borla
e3655f51c9 [CSApply] Perform a regular coerceToType when adjusting types for
preconcurrency.
2023-12-19 08:14:52 -08:00
Holly Borla
8713d78704 [PrintOptions] Print explicit 'any' in SIL. 2022-08-18 01:15:12 -04:00
Doug Gregor
91998f66f7 [Constriant solver] Don't adjust types in calls to @preconcurrency functions
When calling a `@preconcurrency` function, don't adjust the types of
parameters. Instead, we'll suppress or alter diagnostics later on to deal
with Sendable and global-actor mismatches.

Fixes the crash from rdar://95995193, but diagnostics need more work.
2022-07-01 11:04:25 -07:00
Doug Gregor
0674058ba0 Introduce more AST function conversions for @preconcurrency-adjusted types.
When referring to a `@preconcurrency` function as a value, use the normal
type for the initial declaration reference and then introduce an
appropriate function conversion expression to the adjusted type.

Fixes more issues related to rdar://94597323.
2022-06-30 17:00:56 -07:00