Commit Graph

30 Commits

Author SHA1 Message Date
Anthony Latsis
b5aec4cc34 [test] Remove pre-rebranch nocapture matches
These were added in https://github.com/swiftlang/swift/pull/81375 (and
several other follow-up PRs because we missed a few places) and
are no longer needed.
2025-10-24 02:07:22 +01:00
Anthony Latsis
55e5618eab [test] Match nocapture to succeed both on main and rebranch
Both the syntax and relative order of the LLVM `nocapture` parameter
attribute changed upstream in 29441e4f5fa5f5c7709f7cf180815ba97f611297.
To reduce conflicts with rebranch, adjust FileCheck patterns to expect
both syntaxes and orders anywhere the presence of the attribute is not
critical to the test. These changes are temporary and will be cleaned
up once rebranch is merged into main.
2025-05-08 23:52:43 +01:00
Arnold Schwaighofer
3b5ebaa46c Fix some tests in IRGen folder 2023-06-21 10:10:32 -07:00
Arnold Schwaighofer
c1a93e0bde Move tests over to use the %use_no_opaque_pointers option 2023-06-14 10:49:48 -07:00
Arnold Schwaighofer
d44b7927be Fix tests 2022-07-15 13:12:03 -07:00
Arnold Schwaighofer
9ee12db2a9 Fix tests for LLVM change that added anonymous parameter labeling
Fix for r367755.
2019-08-15 14:57:24 -07:00
Michael Gottesman
fd4828e40a Eliminate -assume-parsing-unqualified-ownership-sil from tests.
I am doing this separately from the actual change to eliminate the option to
make it easier to review.
2018-12-19 12:54:13 -08:00
Erik Eckstein
39bb14b094 change mangling prefix from $S to $s
This is the final ABI mangling prefix

rdar://problem/38471478
2018-09-19 13:55:11 -07:00
Saleem Abdulrasool
d746a6d1db tests: annotate dllstorage on IRGen tests
This adds the dllstorage annotations on the tests.  This first pass gets
most of the IRGen tests passing on Windows (though has dependencies on
other changes).  However, this allows for the changes to be merged more
easily as we cannot regress other platforms here.
2018-04-23 20:21:10 -07:00
Michael Gottesman
cb80f65f1e Remove plus_zero_test,plus_one_test from lit tests since they are no longer needed.
I am going to leave in the infrastructure around this just in case. But there is
no reason to keep this in the tests themselves. I can always just revert this
and I don't think merge conflicts are likely due to previous work I did around
the tooling for this.
2018-03-21 20:49:52 -07:00
Michael Gottesman
e567bc9028 [+0-all-args] Enable +0 normal arguments.
rdar://34222540
2018-03-19 20:25:31 -07:00
Michael Gottesman
b00966e247 [+0-all-args] Add more module_names to tests to enable running their plus_zero variants.
rdar://34222540
2018-03-13 19:47:50 -07:00
Michael Gottesman
8dd5ea9b60 [+0-all-args] Add a space after REQUIRES: plus_one_runtime to eliminate avoidable merge conflicts when editing other parts of the file.
This helps my tooling for enabling +0.
2018-03-11 16:19:09 -07:00
Michael Gottesman
e6e55df5ea [+0-all-args] Mark all tests that will need updates for +0 as requiring a plus_one_runtime. 2018-03-10 02:37:51 -08:00
Greg Parker
e223f1fc9b [IRGen][runtime] Simplify runtime CCs and entry point ABIs (#14175)
* Remove RegisterPreservingCC. It was unused.
* Remove DefaultCC from the runtime. The distinction between C_CC and DefaultCC
  was unused and inconsistently applied. Separate C_CC and DefaultCC are
  still present in the compiler.
* Remove function pointer indirection from runtime functions except those
  that are used by Instruments. The remaining Instruments interface is
  expected to change later due to function pointer liability.
* Remove swift_rt_ wrappers. Function pointers are an ABI liability that we
  don't want, and there are better ways to get nonlazy binding if we need it.
  The fully custom wrappers were only needed for RegisterPreservingCC and
  for optimizing the Instruments function pointers.
2018-01-29 13:22:30 -08:00
Erik Eckstein
cd3d50a5d9 ABI: Change the mangling prefix from _T0 to $S 2018-01-06 13:55:59 -08:00
Pavel Yaskevich
0133827e55 [Mangling/ABI] NFC: Fix IRGen tests to reflect label mangling changes 2017-12-18 15:45:50 -08:00
Erik Eckstein
c4a11f4c92 tests: remove the now unused option -new-mangling-for-tests 2017-03-22 11:28:43 -07:00
Erik Eckstein
8e3b05d2f4 IRGen: Use new mangling for llvm type names.
This should have no effect on the generated binary.
2017-02-22 09:19:10 -08:00
Arnold Schwaighofer
39fa2f0228 Use the swift calling convention for swift functions
Use the generic type lowering algorithm described in
"docs/CallingConvention.rst#physical-lowering" to map from IRGen's explosion
type to the type expected by the ABI.

Change IRGen to use the swift calling convention (swiftcc) for native swift
functions.

Use the 'swiftself' attribute on self parameters and for closures contexts.

Use the 'swifterror' parameter for swift error parameters.

Change functions in the runtime that are called as native swift functions to use
the swift calling convention.

rdar://19978563
2017-02-14 12:17:57 -08:00
Erik Eckstein
1d3724666f tests: convert about 400 tests to the new mangling by using the -new-mangling-for-tests option
When the new mangling is enabled permanently, the option can be removed from the RUN command lines again.
2017-01-24 15:27:45 -08:00
Michael Gottesman
20dd563efb [semantic-arc] Update tests for qualified/unqualified ownership and SILGen emission of copy_value, destroy_value. 2016-10-29 20:11:09 -07:00
Roman Levenstein
56d55dec2b [swift-runtime] Rename rt_swift_* to swift_rt_*. NFC
Swift uses rt_swift_* functions to call the Swift runtime without using dyld's stubs. These functions are renamed to swift_rt_* to reduce namespace pollution.

rdar://28706212
2016-10-11 09:49:06 -07:00
Michael Gottesman
fa1bb95923 Merge remote-tracking branch 'origin/master' into master-next 2016-08-30 19:50:12 -07:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Vedant Kumar
c5736c5a7b [test/IRGen] Fix a test failure in runtime_calling_conventions.swift
Fix a mistake introduced by 1409a445, which moved us to the new
setUnnamedAddr API introduced by llvm/r272709.

rt_swift_release is linkonce_odr, so each module gets an identical copy
of it and its address doesn't matter. Set the local_unnamed_addr
attribute on it.

Thanks to Saleem Abdulrasool for the catch!
2016-06-27 18:32:31 -07:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Slava Pestov
811623284a IRGen: Clean up runtime_calling_convention test
Removing the duplicate function and adding -parse-as-library makes
the order of definitions not depend on whether the standard library
was built with -sil-serialize-all or not.
2016-04-01 13:07:18 -07:00
Roman Levenstein
2ff5755dc3 Use the "rt_" prefix for all generated wrappers to distinguish them from the actual runtime functions. 2016-02-25 06:00:30 -08:00
Roman Levenstein
a185d900a5 Add a test to check that new calling convention is used and wrappers are generated. 2016-02-25 05:31:01 -08:00