Skip to content

Commit bf80250

Browse files
committed
Merge remote-tracking branch 'upstream/master' into type-cannot-conform-diag
2 parents 7687293 + 94265e8 commit bf80250

File tree

422 files changed

+7893
-6299
lines changed

Some content is hidden

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

422 files changed

+7893
-6299
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ set(SWIFT_NATIVE_CLANG_TOOLS_PATH "" CACHE STRING
219219
set(SWIFT_NATIVE_SWIFT_TOOLS_PATH "" CACHE STRING
220220
"Path to the directory that contains Swift tools that are executable on the build machine")
221221

222-
option(SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES
222+
option(SWIFT_ENABLE_MODULE_INTERFACES
223223
"Generate .swiftinterface files alongside .swiftmodule files"
224224
TRUE)
225225

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414

1515
| **OS** | **Architecture** | **Build** |
1616
|---|:---:|:---:|
17-
|**[Debian 9.1 (Raspberry Pi)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/armv7_debian_stretch.json)** | ARMv7 | [![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-debian-9_1/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-debian-9_1)|
18-
|**[Fedora 27](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_fedora_27.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-fedora-27/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-fedora-27)|
19-
|**[Ubuntu 16.04](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04)|
2017
|**[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)|
2118
|**[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)|
2219
|**[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)|

cmake/modules/StandaloneOverlay.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ set(SWIFT_NATIVE_CLANG_TOOLS_PATH "${TOOLCHAIN_DIR}/usr/bin" CACHE STRING
5858
set(SWIFT_NATIVE_SWIFT_TOOLS_PATH "${TOOLCHAIN_DIR}/usr/bin" CACHE STRING
5959
"Path to Swift tools that are executable on the build machine.")
6060

61-
option(SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES
61+
option(SWIFT_ENABLE_MODULE_INTERFACES
6262
"Generate .swiftinterface files alongside .swiftmodule files."
6363
TRUE)
6464

cmake/modules/SwiftSource.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,10 @@ function(_compile_swift_files
323323
set(sibopt_file "${module_base}.O.sib")
324324
set(sibgen_file "${module_base}.sibgen")
325325

326-
if(SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES)
326+
if(SWIFT_ENABLE_MODULE_INTERFACES)
327327
set(interface_file "${module_base}.swiftinterface")
328328
list(APPEND swift_module_flags
329-
"-emit-parseable-module-interface-path" "${interface_file}")
329+
"-emit-module-interface-path" "${interface_file}")
330330
endif()
331331

332332
# If we have extra regexp flags, check if we match any of the regexps. If so

docs/SIL.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2525,9 +2525,10 @@ except that ``destroy_addr`` may be used even if ``%0`` is of an
25252525
address-only type. This does not deallocate memory; it only destroys the
25262526
pointed-to value, leaving the memory uninitialized.
25272527

2528-
If ``T`` is a trivial type, then ``destroy_addr`` is a no-op. However, even a
2529-
memory location ``%a`` with a trivial type must not be accessed after a
2530-
``destroy_addr %a``.
2528+
If ``T`` is a trivial type, then ``destroy_addr`` can be safely
2529+
eliminated. However, a memory location ``%a`` must not be accessed
2530+
after ``destroy_addr %a`` (which has not yet been eliminated)
2531+
regardless of its type.
25312532

25322533
index_addr
25332534
``````````

include/swift/AST/ASTScope.h

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ class ASTScopeImpl {
215215

216216
bool checkSourceRangeOfThisASTNode() const;
217217

218+
/// For debugging
219+
bool doesRangeMatch(unsigned start, unsigned end, StringRef file = "",
220+
StringRef className = "");
221+
218222
private:
219223
SourceRange computeSourceRangeOfScope(bool omitAssertions = false) const;
220224
SourceRange
@@ -264,7 +268,7 @@ class ASTScopeImpl {
264268
getSourceRangeOfEnclosedParamsOfASTNode(bool omitAssertions) const;
265269

266270
private:
267-
bool checkSourceRangeAfterExpansion() const;
271+
bool checkSourceRangeAfterExpansion(const ASTContext &) const;
268272

269273
#pragma mark common queries
270274
public:
@@ -318,9 +322,9 @@ class ASTScopeImpl {
318322
private:
319323
/// Compare the pre-expasion range with the post-expansion range and return
320324
/// false if lazyiness couild miss lookups.
321-
bool checkLazySourceRange() const;
325+
bool checkLazySourceRange(const ASTContext &) const;
322326

323-
protected:
327+
public:
324328
/// Some scopes can be expanded lazily.
325329
/// Such scopes must: not change their source ranges after expansion, and
326330
/// their expansion must return an insertion point outside themselves.
@@ -517,6 +521,7 @@ class ASTSourceFileScope final : public ASTScopeImpl {
517521
NullablePtr<DeclContext> getDeclContext() const override;
518522

519523
void addNewDeclsToScopeTree();
524+
void buildScopeTreeEagerly();
520525

521526
const SourceFile *getSourceFile() const override;
522527
NullablePtr<const void> addressForPrinting() const override { return SF; }
@@ -1002,6 +1007,10 @@ class AbstractFunctionBodyScope : public ASTScopeImpl {
10021007
DeclConsumer) const override;
10031008
Optional<bool>
10041009
resolveIsCascadingUseForThisScope(Optional<bool>) const override;
1010+
1011+
public:
1012+
NullablePtr<ASTScopeImpl> insertionPointForDeferredExpansion() override;
1013+
SourceRange sourceRangeForDeferredExpansion() const override;
10051014
};
10061015

10071016
/// Body of methods, functions in types.

0 commit comments

Comments
 (0)