Commit Graph

6 Commits

Author SHA1 Message Date
Saleem Abdulrasool
afd0b69a8c test: get most of the multifile tests working on Windows
We cannot link against the DSO (dll) on Windows and instead link against
the import library.  Let the driver understand this and use the standard
linking technique.  Adjust the name of the emitted files accordingly and
use the `%target-library-name` macro more freely.

Two tests remain:
- multifile.protocol-conformance-member
    The getter is synthesized by not exported so `llvm-nm` is unable to
    see it
- multifile.nested_types
    Windows uses the singleton strategy, so the emitted full type
    metadata does not have the reference to the value witness table for
    Void
2018-12-25 11:26:53 -08:00
Saleem Abdulrasool
b212229db1 test: add and use prefix substitutions for libraries
The naming convention is different on Windows than on Unix-like
environments.  In order to follow the convention we need to substitute
the prefix and the suffix.  Take the opportunity to rename the
`target-dylib-extension` to the CMake-like variable
`target-shared-library-suffix` and introduce
`target-shared-library-prefix`.  This helps linking the test suite
binaries on Windows.
2018-12-11 15:56:06 -08:00
Slava Pestov
cdadee8173 AST: Fix layering violations in DefaultAndMaxAccessLevelRequest
Our walk over the requirement interface types meant that
computing the access level of an extension member depended
on type resolution and the GSB.

Fix this by adding a new request that simply collects all
TypeDecls referenced from a TypeRepr, and compute the
extension's maximum access level using that.

If we use Structural rather than Interface type resolution when
walking the extension's requirements, we don't have to build its
generic signature first.
2018-09-05 16:18:54 -07:00
Slava Pestov
a0c014698d Re-organize multi-file tests a bit
- Put input files in directories named Inputs/ to eliminate bogus 'RUN: true' lines
- Remove executable_test requirement since they're not executable
2017-10-26 15:17:27 -07:00
Robert Widmann
71bf312a25 Migrate the rest of the tests to %empty-directory 2017-06-04 11:08:39 -07:00
Slava Pestov
786d87b9bb DI: Operate on substituted field types
When adding a designated initializer to a nominal type in another
module, we would call getType() on deserialized VarDecls, which
is not allowed.

Instead, it is more correct to use SILTypes throughout and call
SILType::getFieldType() to get a substituted field type.

Fixes <https://bugs.swift.org/browse/SR-3545>.
2017-01-04 21:30:21 -08:00