Commit Graph

12 Commits

Author SHA1 Message Date
finagolfin
55cee0144d [test] Fix or disable tests for 32-bit platforms (#82501)
Fix two IRGen tests that are failing on Android armv7 and disable eight ClangImporter, C++ Interop, and SILOptimizer tests, two of which that were already failing on other 32-bit platforms.
2025-06-30 10:39:26 +05:30
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
Alexander Cyon
db0b5db54e [test/Interop] Fix typos (#75032) 2024-08-28 09:41:09 -07:00
Erik Eckstein
6a020f8f15 Stabilize and simplify SIL linkage and serialization
The main point of this change is to make sure that a shared function always has a body: both, in the optimizer pipeline and in the swiftmodule file.
This is important because the compiler always needs to emit code for a shared function. Shared functions cannot be referenced from outside the module.
In several corner cases we missed to maintain this invariant which resulted in unresolved-symbol linker errors.

As side-effect of this change we can drop the shared_external SIL linkage and the IsSerializable flag, which simplifies the serialization and linkage concept.
2022-03-09 15:28:05 +01:00
zoecarver
283fc782ec Revert "Revert "[cxx-interop] A few cleanups and fixes for function templates.""
This reverts commit 5de09631ff.
2022-02-15 13:30:10 -08:00
Zoe Carver
5de09631ff Revert "[cxx-interop] A few cleanups and fixes for function templates." 2022-02-13 09:54:39 -08:00
zoecarver
daceecfc75 [cxx-interop] Remove generateSpecializedCXXFunctionTemplate and just import the decl directly.
1) This unifies two code paths that do essentially the same thing.
2) This fixes how we import certain types (such as return types).
2022-02-04 16:18:02 -08:00
Saleem Abdulrasool
357face86e test: introduce new target-swiftxx-frontend for C++ interop
Add an convert to the new `target-swiftxx-frontend` substitution in lit
to control the C++ interop enabling in Swift.  This allows for a single
site which will enable control of both an overridden standard (for
testing multiple C++ standards) and simplify writing tests.
2021-01-12 11:45:36 -08:00
zoecarver
08e7160cec [cxx-interop] Support templated C++ constructors. 2020-11-11 09:38:10 -08:00
zoecarver
d9acaf353e [cxx-interop] Merge synthesized initializer tests into "constructors-silgen".
We no longer synthesize initializers for C++ types so this name no longer makes sense.
2020-10-15 13:10:55 -07:00
zoecarver
f04de9f128 [cxx-interop] Skip metatypes when lowering C++ constructor SIL function type.
When lowering a C++ constructor's function type to a SIL function type,
skip over the "self" metatype parameter.
2020-10-09 10:42:54 -07:00
Martin Boehme
cc7564ecd1 Rename constructors-sil.swift to constructors-silgen.swift. 2020-10-09 10:42:52 -07:00