Commit Graph

60 Commits

Author SHA1 Message Date
Varun Gandhi
8da4d53d2c [NFC] Use ClangTypeInfo's implicit null state instead of an extra Optional. 2020-08-27 13:14:05 -07:00
Varun Gandhi
eaac23fdd4 [NFC] Remove ASTExtInfo::assertIsFunctionType in favor of checkInvariants.
Invariants should be checked only when calling build(), not when the builder
itself is created.
2020-08-27 13:14:05 -07:00
swift_jenkins
80f2475366 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-08-25 20:46:48 -07:00
Nate Chandler
f74a3b47fc [SIL] Added async flag to SILExtInfo. 2020-08-25 17:33:27 -07:00
Nathan Hawes
51beab6889 Manually merge remote-tracking branch 'upstream/master' into HEAD
Conflicts:
	test/DebugInfo/modulecache.swift
2020-08-13 11:16:33 -07:00
Doug Gregor
5dd1bfea8d [Concurrency] Add support for 'async' closures.
Closurea can become 'async' in one of two ways:
* They can be explicitly marked 'async' prior to the 'in'
* They can be inferred as 'async' if they include 'await' in the body
2020-08-11 13:59:59 -07:00
Nathan Hawes
3707cfab12 Fix build failures due to Tyoe::dump() api difference + string conversions 2020-08-04 14:19:15 -07:00
Varun Gandhi
3882beb85d [NFC] Use consistent naming scheme for predicate methods. (#33265)
bool throws() -> isThrowing(), bool async() -> isAsync()
2020-08-03 16:37:29 -07:00
Varun Gandhi
29188e3fe7 [AST] Update equality for ExtInfo to take Clang types into account.
In the future, we will remove the UseClangFunctionTypes language option, but we
temporarily need the scaffolding for equality checks to be consistent in all
places.
2020-07-31 13:55:55 -07:00
Varun Gandhi
f219e58ada [NFC] Refactor ExtInfo to use a builder-pattern based API.
Since the two ExtInfos share a common ClangTypeInfo, and C++ doesn't let us
forward declare nested classes, we need to hoist out AnyFunctionType::ExtInfo
and SILFunctionType::ExtInfo to the top-level.

We also add some convenience APIs on (AST|SIL)ExtInfo for frequently used
withXYZ methods. Note that all non-default construction still goes through the
builder's build() method.

We do not add any checks for invariants here; those will be added later.
2020-07-31 13:55:55 -07:00