Skip to content

Commit 7489bab

Browse files
authored
Merge pull request swiftlang#150 from swiftwasm/maxd/swiftwasm-merge
Merge master with resolved conflicts
2 parents 50db842 + 017bfe0 commit 7489bab

File tree

220 files changed

+9398
-1471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+9398
-1471
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ CHANGELOG
2626
Swift Next
2727
----------
2828

29+
* [SE-0266][]:
30+
31+
Enumerations with no associated values, or only `Comparable` associated values, can opt-in to synthesized `Comparable` conformance by declaring conformance to the `Comparable` protocol. The synthesized implementation orders the cases first by case-declaration order, and then by lexicographic order of the associated values (if any).
32+
33+
```swift
34+
enum Foo: Comparable {
35+
case a(Int), b(Int), c
36+
}
37+
38+
// .a(0) < .a(1) < .b(0) < .b(1) < .c
39+
```
40+
2941
* [SE-0269][]:
3042

3143
When an escaping closure explicitly captures `self` in its capture list, the
@@ -7901,6 +7913,7 @@ Swift 1.0
79017913
[SE-0252]: <https://github.com/apple/swift-evolution/blob/master/proposals/0252-keypath-dynamic-member-lookup.md>
79027914
[SE-0253]: <https://github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md>
79037915
[SE-0254]: <https://github.com/apple/swift-evolution/blob/master/proposals/0254-static-subscripts.md>
7916+
[SE-0266]: <https://github.com/apple/swift-evolution/blob/master/proposals/0266-synthesized-comparable-for-enumerations.md>
79047917
[SE-0269]: <https://github.com/apple/swift-evolution/blob/master/proposals/0269-implicit-self-explicit-capture.md>
79057918

79067919
[SR-106]: <https://bugs.swift.org/browse/SR-106>

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
|---|:---:|:---:|
1616
|**[Ubuntu 16.04 ](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/ppc64le_ubuntu_16_04.json)** | PPC64LE |[![Build Status](https://ci-external.swift.org/job/oss-swift-5.1-RA-linux-ubuntu-16.04-ppc64le/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-5.1-RA-linux-ubuntu-16.04-ppc64le)|
1717
|**[Ubuntu 16.04 ](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/aarch64_ubuntu_16.04.json)** | AArch64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-aarch64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-aarch64)|
18+
|**[Ubuntu 18.04 ](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/aarch64_ubuntu_18.04.json)** | AArch64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-18.04-aarch64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-18.04-aarch64)|
1819
|**[Android](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_LTS_android.json)** | ARMv7 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android)|
1920
|**[Android](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_LTS_android.json)** | AArch64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android-arm64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android-arm64)|
20-
|**[Windows 2019](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_windows_2019.json)** | x86_64 | [![Build Status](https://ci-external.swift.org/job/oss-swift-windows-x86_64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-windows-x86_64)|
21+
|**[Windows 2019 (VS 2017)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_windows_2019.json)** | x86_64 | [![Build Status](https://ci-external.swift.org/job/oss-swift-windows-x86_64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-windows-x86_64)|
22+
|**[Windows 2019 (VS 2019)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_windows_2019_VS2019.json)** | x86_64 | [![Build Status](https://ci-external.swift.org/job/oss-swift-windows-x86_64-vs2019/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/ooss-swift-windows-x86_64-vs2019)|
2123

2224
**Swift TensorFlow Community-Hosted CI Platforms**
2325

@@ -108,7 +110,9 @@ Instructions for installing CMake and Ninja directly can be found [below](#build
108110

109111
For Ubuntu, you'll need the following development dependencies:
110112

111-
sudo apt-get install git cmake ninja-build clang python uuid-dev libicu-dev icu-devtools libedit-dev libxml2-dev libsqlite3-dev swig libpython-dev libncurses5-dev pkg-config libcurl4-openssl-dev systemtap-sdt-dev tzdata rsync python-six
113+
sudo apt-get install git cmake ninja-build clang python uuid-dev libicu-dev icu-devtools libedit-dev \
114+
libxml2-dev libsqlite3-dev swig libpython-dev libncurses5-dev pkg-config libcurl4-openssl-dev \
115+
systemtap-sdt-dev tzdata rsync python-six
112116

113117
**Note:** LLDB currently requires at least `swig-1.3.40` but will successfully build
114118
with version 2 shipped with Ubuntu.

cmake/modules/AddSwift.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ function(_add_variant_c_compile_flags)
279279
list(APPEND result "-D_DLL")
280280
# NOTE: We assume that we are using VS 2015 U2+
281281
list(APPEND result "-D_ENABLE_ATOMIC_ALIGNMENT_FIX")
282+
# NOTE: We use over-aligned values for the RefCount side-table
283+
# (see revision d913eefcc93f8c80d6d1a6de4ea898a2838d8b6f)
284+
# This is required to build with VS2017 15.8+
285+
list(APPEND result "-D_ENABLE_EXTENDED_ALIGNED_STORAGE=1")
282286

283287
# msvcprt's std::function requires RTTI, but we do not want RTTI data.
284288
# Emulate /GR-.

cmake/modules/AddSwiftUnittests.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ function(add_swift_unittest test_dirname)
5252
target_compile_options(${test_dirname} PRIVATE
5353
-march=core2)
5454
endif()
55+
elseif("${SWIFT_HOST_VARIANT}" STREQUAL "windows")
56+
target_compile_definitions("${test_dirname}" PRIVATE
57+
_ENABLE_EXTENDED_ALIGNED_STORAGE)
5558
endif()
5659

5760
find_program(LDLLD_PATH "ld.lld")

cmake/modules/SwiftHandleGybSources.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
include(SwiftAddCustomCommandTarget)
22
include(SwiftSetIfArchBitness)
33

4+
find_package(Python2 COMPONENTS Interpreter REQUIRED)
5+
46
# Create a target to process single gyb source with the 'gyb' tool.
57
#
68
# handle_gyb_source_single(
@@ -58,7 +60,7 @@ function(handle_gyb_source_single dependency_out_var_name)
5860
COMMAND
5961
"${CMAKE_COMMAND}" -E make_directory "${dir}"
6062
COMMAND
61-
"${PYTHON_EXECUTABLE}" "${gyb_tool}" ${SWIFT_GYB_FLAGS} ${GYB_SINGLE_FLAGS} -o "${GYB_SINGLE_OUTPUT}.tmp" "${GYB_SINGLE_SOURCE}"
63+
"$<TARGET_FILE:Python2::Interpreter>" "${gyb_tool}" ${SWIFT_GYB_FLAGS} ${GYB_SINGLE_FLAGS} -o "${GYB_SINGLE_OUTPUT}.tmp" "${GYB_SINGLE_SOURCE}"
6264
COMMAND
6365
"${CMAKE_COMMAND}" -E copy_if_different "${GYB_SINGLE_OUTPUT}.tmp" "${GYB_SINGLE_OUTPUT}"
6466
COMMAND

docs/SIL.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5666,6 +5666,42 @@ destination (if it returns with ``throw``).
56665666

56675667
The rules on generic substitutions are identical to those of ``apply``.
56685668

5669+
Differentiable Programming
5670+
~~~~~~~~~~~~~~~~~~~~~~~~~~
5671+
5672+
differentiability_witness_function
5673+
``````````````````````````````````
5674+
::
5675+
5676+
sil-instruction ::=
5677+
'differentiability_witness_function'
5678+
'[' sil-differentiability-witness-function-kind ']'
5679+
'[' 'parameters' sil-differentiability-witness-function-index-list ']'
5680+
'[' 'results' sil-differentiability-witness-function-index-list ']'
5681+
generic-parameter-clause?
5682+
sil-function-name ':' sil-type
5683+
5684+
sil-differentiability-witness-function-kind ::= 'jvp' | 'vjp' | 'transpose'
5685+
sil-differentiability-witness-function-index-list ::= [0-9]+ (' ' [0-9]+)*
5686+
5687+
differentiability_witness_function [jvp] [parameters 0] [results 0] \
5688+
<T where T: Differentiable> @foo : $(T) -> T
5689+
5690+
Looks up a differentiability witness function (JVP, VJP, or transpose) for
5691+
a referenced function via SIL differentiability witnesses.
5692+
5693+
The differentiability witness function kind identifies the witness function to
5694+
look up: ``[jvp]``, ``[vjp]``, or ``[transpose]``.
5695+
5696+
The remaining components identify the SIL differentiability witness:
5697+
5698+
- Original function name.
5699+
- Parameter indices.
5700+
- Result indices.
5701+
- Witness generic parameter clause (optional). When parsing SIL, the parsed
5702+
witness generic parameter clause is combined with the original function's
5703+
generic signature to form the full witness generic signature.
5704+
56695705
Assertion configuration
56705706
~~~~~~~~~~~~~~~~~~~~~~~
56715707

include/swift/ABI/Metadata.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,32 @@ struct TargetEnumMetadata : public TargetValueMetadata<Runtime> {
14261426
return *asWords;
14271427
}
14281428

1429+
bool isCanonicalStaticallySpecializedGenericMetadata() const {
1430+
auto *description = getDescription();
1431+
if (!description->isGeneric())
1432+
return false;
1433+
1434+
auto *trailingFlags = getTrailingFlags();
1435+
if (trailingFlags == nullptr)
1436+
return false;
1437+
1438+
return trailingFlags->isCanonicalStaticSpecialization();
1439+
}
1440+
1441+
const MetadataTrailingFlags *getTrailingFlags() const {
1442+
auto description = getDescription();
1443+
auto flags = description->getFullGenericContextHeader()
1444+
.DefaultInstantiationPattern->PatternFlags;
1445+
if (!flags.hasTrailingFlags())
1446+
return nullptr;
1447+
auto offset =
1448+
getGenericArgumentOffset() +
1449+
description->getFullGenericContextHeader().Base.getNumArguments() +
1450+
(hasPayloadSize() ? 1 : 0);
1451+
auto asWords = reinterpret_cast<const void *const *>(this);
1452+
return reinterpret_cast<const MetadataTrailingFlags *>(asWords + offset);
1453+
}
1454+
14291455
static constexpr int32_t getGenericArgumentOffset() {
14301456
return sizeof(TargetEnumMetadata<Runtime>) / sizeof(StoredPointer);
14311457
}

include/swift/AST/Attr.def

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,11 @@ SIMPLE_DECL_ATTR(_inheritsConvenienceInitializers,
519519
APIStableToAdd | ABIStableToAdd | APIBreakingToRemove | ABIBreakingToRemove,
520520
93)
521521

522+
DECL_ATTR(_typeEraser, TypeEraser,
523+
OnProtocol | UserInaccessible | NotSerialized |
524+
ABIStableToAdd | ABIBreakingToRemove | APIStableToAdd | APIBreakingToRemove,
525+
94)
526+
522527
SIMPLE_DECL_ATTR(IBSegueAction, IBSegueAction,
523528
OnFunc |
524529
ABIStableToAdd | ABIStableToRemove | APIStableToAdd | APIStableToRemove,

include/swift/AST/Attr.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,21 @@ class DynamicReplacementAttr final
11081108
}
11091109
};
11101110

1111+
/// The \c @_typeEraser(TypeEraserType) attribute.
1112+
class TypeEraserAttr final : public DeclAttribute {
1113+
TypeLoc TypeEraserLoc;
1114+
public:
1115+
TypeEraserAttr(SourceLoc atLoc, SourceRange range, TypeLoc typeEraserLoc)
1116+
: DeclAttribute(DAK_TypeEraser, atLoc, range, /*Implicit=*/false),
1117+
TypeEraserLoc(typeEraserLoc) {}
1118+
1119+
const TypeLoc &getTypeEraserLoc() const { return TypeEraserLoc; }
1120+
1121+
static bool classof(const DeclAttribute *DA) {
1122+
return DA->getKind() == DAK_TypeEraser;
1123+
}
1124+
};
1125+
11111126
/// Represents any sort of access control modifier.
11121127
class AbstractAccessControlAttr : public DeclAttribute {
11131128
protected:

include/swift/AST/AutoDiff.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,27 @@ struct AutoDiffDerivativeFunctionKind {
7373
}
7474
};
7575

76+
/// The kind of a differentiability witness function.
77+
struct DifferentiabilityWitnessFunctionKind {
78+
enum innerty : uint8_t {
79+
// The Jacobian-vector products function.
80+
JVP = 0,
81+
// The vector-Jacobian products function.
82+
VJP = 1,
83+
// The transpose function.
84+
Transpose = 2
85+
} rawValue;
86+
87+
DifferentiabilityWitnessFunctionKind() = default;
88+
DifferentiabilityWitnessFunctionKind(innerty rawValue) : rawValue(rawValue) {}
89+
explicit DifferentiabilityWitnessFunctionKind(unsigned rawValue)
90+
: rawValue(static_cast<innerty>(rawValue)) {}
91+
explicit DifferentiabilityWitnessFunctionKind(StringRef name);
92+
operator innerty() const { return rawValue; }
93+
94+
Optional<AutoDiffDerivativeFunctionKind> getAsDerivativeFunctionKind() const;
95+
};
96+
7697
/// Identifies an autodiff derivative function configuration:
7798
/// - Parameter indices.
7899
/// - Result indices.

include/swift/AST/Decl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6417,6 +6417,10 @@ class AccessorDecl final : public FuncDecl {
64176417
llvm_unreachable("bad accessor kind");
64186418
}
64196419

6420+
bool isImplicitGetter() const {
6421+
return isGetter() && getAccessorKeywordLoc().isInvalid();
6422+
}
6423+
64206424
void setIsTransparent(bool transparent) {
64216425
Bits.AccessorDecl.IsTransparent = transparent;
64226426
Bits.AccessorDecl.IsTransparentComputed = 1;

include/swift/AST/DiagnosticsFrontend.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ REMARK(platform_previous_install_name, none,
284284
ERROR(unknown_platform_name, none,
285285
"unkown platform name %0", (StringRef))
286286

287+
ERROR(unknown_swift_module_name, none,
288+
"cannot find Swift module with name %0", (StringRef))
289+
287290
ERROR(cannot_find_install_name, none,
288291
"cannot find previous install name for module %0 in %1", (StringRef, StringRef))
289292

include/swift/AST/DiagnosticsParse.def

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,6 +1490,11 @@ ERROR(attr_dynamic_replacement_expected_for,none,
14901490
ERROR(attr_dynamic_replacement_expected_colon,none,
14911491
"expected ':' after @_dynamicReplacement(for", ())
14921492

1493+
ERROR(attr_type_eraser_expected_type_name,none,
1494+
"expected a type name in @_typeEraser()", ())
1495+
ERROR(attr_type_eraser_expected_rparen,none,
1496+
"expected ')' after type name for @_typeEraser", ())
1497+
14931498
ERROR(attr_private_import_expected_rparen,none,
14941499
"expected ')' after function name for @_private", ())
14951500
ERROR(attr_private_import_expected_sourcefile, none,
@@ -1604,6 +1609,13 @@ ERROR(sil_autodiff_expected_parameter_index,PointsToFirstBadToken,
16041609
"expected the index of a parameter to differentiate with respect to", ())
16051610
ERROR(sil_autodiff_expected_result_index,PointsToFirstBadToken,
16061611
"expected the index of a result to differentiate from", ())
1612+
ERROR(sil_inst_autodiff_expected_differentiability_witness_kind,PointsToFirstBadToken,
1613+
"expected a differentiability witness kind, which can be one of '[jvp]', "
1614+
"'[vjp]', or '[transpose]'", ())
1615+
ERROR(sil_inst_autodiff_invalid_witness_generic_signature,PointsToFirstBadToken,
1616+
"expected witness_generic signature '%0' does not have same generic "
1617+
"parameters as original function generic signature '%1'",
1618+
(StringRef, StringRef))
16071619

16081620
//------------------------------------------------------------------------------
16091621
// MARK: Generics parsing diagnostics

include/swift/AST/DiagnosticsSema.def

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,13 @@ ERROR(ambiguous_member_overload_set,none,
6161
ERROR(ambiguous_reference_to_decl,none,
6262
"ambiguous reference to %0 %1", (DescriptiveDeclKind, DeclName))
6363
ERROR(no_overloads_match_exactly_in_call,none,
64-
"no exact matches in call to %0 %1",
65-
(DescriptiveDeclKind, DeclName))
66-
ERROR(no_overloads_match_exactly_in_call_no_labels,none,
67-
"no exact matches in call to %0 %1",
68-
(DescriptiveDeclKind, DeclBaseName))
69-
ERROR(no_overloads_match_exactly_in_call_special,none,
70-
"no exact matches in call to %0",
71-
(DescriptiveDeclKind))
72-
ERROR(no_overloads_match_exactly_in_assignment,none,
73-
"no exact matches in assignment to %0",
74-
(DeclBaseName))
64+
"no exact matches in %select{reference|call}0 to %1 %select{%3|}2",
65+
(bool, DescriptiveDeclKind, bool, DeclBaseName))
7566

7667
NOTE(candidate_partial_match,none,
7768
"candidate has partially matching parameter list %0",
7869
(StringRef))
7970

80-
ERROR(ambiguous_subscript,none,
81-
"ambiguous subscript with base type %0 and index type %1",
82-
(Type, Type))
8371
ERROR(could_not_find_value_subscript,none,
8472
"value of type %0 has no subscripts",
8573
(Type))
@@ -282,16 +270,6 @@ ERROR(no_candidates_match_result_type,none,
282270
"no '%0' candidates produce the expected contextual result type %1",
283271
(StringRef, Type))
284272

285-
ERROR(candidates_no_match_result_type,none,
286-
"'%0' produces %1, not the expected contextual result type %2",
287-
(StringRef, Type, Type))
288-
289-
290-
291-
ERROR(invalid_callee_result_type,none,
292-
"cannot convert call result type %0 to expected type %1",
293-
(Type, Type))
294-
295273

296274
ERROR(cannot_invoke_closure,none,
297275
"cannot invoke closure expression with an argument list of type '%0'",
@@ -407,6 +385,10 @@ ERROR(cannot_convert_argument_value_generic,none,
407385
"cannot convert value of type %0 (%1) to expected argument type %2 (%3)",
408386
(Type, StringRef, Type, StringRef))
409387

388+
ERROR(conflicting_arguments_for_generic_parameter,none,
389+
"conflicting arguments to generic parameter %0 (%1)",
390+
(Type, StringRef))
391+
410392
// @_nonEphemeral conversion diagnostics
411393
ERROR(cannot_pass_type_to_non_ephemeral,none,
412394
"cannot pass %0 to parameter; argument %1 must be a pointer that "
@@ -3712,18 +3694,14 @@ ERROR(pattern_type_mismatch_context,none,
37123694

37133695
ERROR(tuple_pattern_in_non_tuple_context,none,
37143696
"tuple pattern cannot match values of the non-tuple type %0", (Type))
3715-
WARNING(matching_pattern_with_many_assoc_values, none,
3716-
"cannot match several associated values at once, "
3717-
"implicitly tupling the associated values and trying to match that "
3718-
"instead", ())
3719-
WARNING(matching_tuple_pattern_with_many_assoc_values,none,
3720-
"a tuple pattern cannot match several associated values at once, "
3721-
"implicitly tupling the associated values and trying to match "
3722-
"that instead", ())
3723-
WARNING(matching_many_patterns_with_tupled_assoc_value,none,
3724-
"the enum case has a single tuple as an associated value, but "
3725-
"there are several patterns here, implicitly tupling the patterns "
3726-
"and trying to match that instead", ())
3697+
WARNING(found_one_pattern_for_several_associated_values,none,
3698+
"enum case '%0' has %1 associated values; matching them as a tuple "
3699+
"is deprecated", (StringRef, unsigned))
3700+
WARNING(converting_tuple_into_several_associated_values,none,
3701+
"enum case '%0' has %1 associated values", (StringRef, unsigned))
3702+
WARNING(converting_several_associated_values_into_tuple,none,
3703+
"enum case '%0' has one associated value that is a tuple of %1 "
3704+
"elements",(StringRef, unsigned))
37273705
ERROR(closure_argument_list_tuple,none,
37283706
"contextual closure type %0 expects %1 argument%s1, "
37293707
"but %2 %select{were|was}3 used in closure body", (Type, unsigned, unsigned, bool))
@@ -4922,6 +4900,14 @@ NOTE(function_builder_remove_attr, none,
49224900
NOTE(function_builder_remove_returns, none,
49234901
"remove 'return' statements to apply the function builder", ())
49244902

4903+
//------------------------------------------------------------------------------
4904+
// MARK: Tuple Shuffle Diagnostics
4905+
//------------------------------------------------------------------------------
4906+
4907+
WARNING(warn_reordering_tuple_shuffle_deprecated,none,
4908+
"expression shuffles the elements of this tuple; "
4909+
"this behavior is deprecated", ())
4910+
49254911
//------------------------------------------------------------------------------
49264912
// MARK: differentiable programming diagnostics
49274913
//------------------------------------------------------------------------------

include/swift/AST/LazyResolver.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ class alignas(void*) LazyMemberLoader {
8181

8282
/// Populates a vector with all members of \p IDC that have DeclName
8383
/// matching \p N.
84-
///
85-
/// Returns None if an error occurred \em or named member-lookup
86-
/// was otherwise unsupported in this implementation or Decl.
87-
virtual Optional<TinyPtrVector<ValueDecl *>>
84+
virtual TinyPtrVector<ValueDecl *>
8885
loadNamedMembers(const IterableDeclContext *IDC, DeclBaseName N,
8986
uint64_t contextData) = 0;
9087

include/swift/Basic/Lazy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifdef __APPLE__
1818
#include <dispatch/dispatch.h>
1919
#elif defined(__wasi__)
20-
// No pthread on wasi
20+
// No pthread on wasi, see https://bugs.swift.org/browse/SR-12097 for more details.
2121
#else
2222
#include <mutex>
2323
#endif

0 commit comments

Comments
 (0)