Commit Graph

7 Commits

Author SHA1 Message Date
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
Ehud Adler
0f83b65f9b [cxx-interop] Remove impl for constexpr members (#60154)
* Remove impl for constexpr members

* Readd some tets

* Only remove import of static constexpr
2022-07-21 15:41:17 -04:00
zoecarver
839839f924 [cxx-interop] Rename enable-cxx-interop -> enable-experimental-cxx-interop.
Also removes the driver flag, this will now also always be guarded on `-Xfrontend`.
2022-04-07 19:15:25 -07:00
zoecarver
6bc2696e24 [cxx-interop] Inline constexpr vars.
If a static variable can be evaluated at compile time, create an
accessor using that value. This means static variables will always be
inlined and removed.

Note: currently this only works with numeric types.
2021-01-08 14:22:25 -08:00
Erik Eckstein
4aa99a2dd0 SILPrinter: print linkage for external globals.
Unlike SIL functions, there is no way to distinguish a global declaration from a global definition - other than the linkage.
2020-06-22 16:49:26 +02:00
Marcel Hlopko
45509cd885 Add // clang name: Foo::bar comment to globals/functions/static member variables 2020-04-30 16:55:14 +02:00
Marcel Hlopko
6e50c91b37 [CxxInterop] Add tests for static vars
[SR-12464](https://bugs.swift.org/browse/SR-12464)
2020-04-29 10:19:37 +02:00