Skip to content

Commit 02a947d

Browse files
authored
---
yaml --- r: 347903 b: refs/heads/master c: 8281e2f h: refs/heads/master i: 347901: 1ab3b73 347899: 4645482 347895: 674d256 347887: 0ce3be2 347871: b6fc417 347839: 43ae2ec 347775: d0860a9 347647: fed6594
1 parent 840f25d commit 02a947d

20 files changed

+86
-20
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: f33fa6b0378dca4d75f892aab2c06ae74da88b21
2+
refs/heads/master: 8281e2f9cf3e1b1f56e4b585d42790901d4038fa
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/lib/IRGen/GenDecl.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2398,7 +2398,8 @@ llvm::Function *IRGenModule::getAddrOfSILFunction(
23982398

23992399
static llvm::GlobalVariable *createGOTEquivalent(IRGenModule &IGM,
24002400
llvm::Constant *global,
2401-
LinkEntity entity) {
2401+
LinkEntity entity)
2402+
{
24022403
// Determine the name of this entity.
24032404
llvm::SmallString<64> globalName;
24042405
entity.mangle(globalName);
@@ -2421,7 +2422,17 @@ static llvm::GlobalVariable *createGOTEquivalent(IRGenModule &IGM,
24212422
llvm::GlobalValue::PrivateLinkage,
24222423
global,
24232424
llvm::Twine("got.") + globalName);
2424-
gotEquivalent->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
2425+
2426+
// rdar://problem/50968433: Unnamed_addr constants appear to get emitted
2427+
// with incorrect alignment by the LLVM JIT in some cases. Don't use
2428+
// unnamed_addr as a workaround.
2429+
if (!IGM.getOptions().UseJIT) {
2430+
gotEquivalent->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
2431+
} else {
2432+
ApplyIRLinkage(IRLinkage::InternalLinkOnceODR)
2433+
.to(gotEquivalent);
2434+
}
2435+
24252436
return gotEquivalent;
24262437
}
24272438

trunk/test/Interpreter/SDK/objc_getClass.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ testSuite.test("GenericMangled")
179179
reason: "objc_getClass hook not present"))
180180
.requireOwnProcess()
181181
.code {
182+
guard #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) else { return }
182183
requireClass(named: "_TtC4main24ConstrainedSwiftSubclass",
183184
demangledName: "main.ConstrainedSwiftSubclass")
184185
requireClass(named: "_TtC4main26ConstrainedSwiftSuperclass",
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// RUN: %target-run-simple-swift
2+
// REQUIRES: executable_test
3+
4+
struct Container<Base, Value, Content>
5+
where Base: Collection
6+
{
7+
var base: Base
8+
var elementPath: KeyPath<Base.Element, Value>
9+
var content: (Value) -> Content
10+
}
11+
12+
let x = Container(base: 1...10, elementPath: \.bitWidth) {
13+
return String($0, radix: 2)
14+
}
15+
16+
// CHECK: i hope we passed the audition
17+
print("i hope we passed the audition")

trunk/test/ParseableInterface/ModuleCache/RebuildRemarks/out-of-date-cached-module.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// RUN: %target-swift-frontend -typecheck %s -I %t/Build -module-cache-path %t/ModuleCache
1212

1313
// 4. Touch the interface so the cached module is no longer up-to-date
14-
// RUN: touch %t/Build/TestModule.swiftinterface
14+
// RUN: %{python} %S/../Inputs/make-old.py %t/Build/TestModule.swiftinterface
1515

1616
// 5. Try to import the now out-of-date cached module
1717
// RUN: %target-swift-frontend -typecheck -verify %s -I %t/Build -Rmodule-interface-rebuild -module-cache-path %t/ModuleCache

trunk/test/ParseableInterface/ModuleCache/RebuildRemarks/out-of-date-compiled-module.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// RUN: %target-swift-frontend -compile-module-from-interface -o %t/Build/TestModule.swiftmodule %t/Build/TestModule.swiftinterface
1212

1313
// 4. Touch the interface so the module is no longer up-to-date
14-
// RUN: touch %t/Build/TestModule.swiftinterface
14+
// RUN: %{python} %S/../Inputs/make-old.py %t/Build/TestModule.swiftinterface
1515

1616
// 5. Try to import the out-of-date compiled module
1717
// RUN: %target-swift-frontend -typecheck -verify %s -I %t/Build -Rmodule-interface-rebuild -module-cache-path %t/ModuleCache

trunk/test/ParseableInterface/ModuleCache/RebuildRemarks/rebuild-transitive-import.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// RUN: %target-swift-frontend -compile-module-from-interface -o %t/Build/InnerModule.swiftmodule %t/Build/InnerModule.swiftinterface
1010

1111
// 3. Touch the interface so the module becomes out of date.
12-
// RUN: touch %t/Build/InnerModule.swiftinterface
12+
// RUN: %{python} %S/../Inputs/make-old.py %t/Build/InnerModule.swiftinterface
1313

1414
// 4. Create a module called OuterModule that imports InnerModule, and put its interface into the build dir.
1515
// RUN: echo 'import InnerModule' | %target-swift-frontend - -emit-module -o %t/Build/OuterModule.swiftmodule -module-name OuterModule -I %t/Build

trunk/test/PlaygroundTransform/implicit_return_never.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -playground -Xfrontend -disable-playground-transform -o %t/main %t/main.swift
44
// RUN: %target-codesign %t/main
5-
// RUN: %{python} %S/Inputs/not.py "%target-run %t/main --crash" 2>&1 | %FileCheck -check-prefix=CRASH-CHECK %s
5+
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/main --crash" 2>&1 | %FileCheck -check-prefix=CRASH-CHECK %s
66
// REQUIRES: executable_test
77

88
// NOTE: not.py is used above instead of "not --crash" because simctl's exit

trunk/test/PlaygroundTransform/placeholder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %target-build-swift -Xfrontend -playground -Xfrontend -disable-playground-transform -o %t/main %t/main.swift
44
// RUN: %target-codesign %t/main
55
// RUN: %target-run %t/main | %FileCheck %s
6-
// RUN: %{python} %S/Inputs/not.py "%target-run %t/main --crash" 2>&1 | %FileCheck -check-prefix=CRASH-CHECK %s
6+
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/main --crash" 2>&1 | %FileCheck -check-prefix=CRASH-CHECK %s
77
// REQUIRES: executable_test
88

99
// NOTE: not.py is used above instead of "not --crash" because simctl's exit
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-frontend -emit-module-path %t/resilient_struct.swiftmodule %S/../Inputs/resilient_struct.swift -enable-library-evolution
3+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module-path %t/resilient_objc_class.swiftmodule %S/../Inputs/resilient_objc_class.swift -I %t -enable-library-evolution -emit-objc-header-path %t/resilient_objc_class.h
4+
5+
// RUN: cp %S/Inputs/custom-modules/module.map %t/module.map
6+
7+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %S/resilient-ancestry.swift -module-name resilient -emit-objc-header-path %t/resilient.h -I %t -enable-library-evolution -enable-resilient-objc-class-stubs
8+
// RUN: %FileCheck %S/resilient-ancestry.swift < %t/resilient.h
9+
// RUN: %check-in-clang %t/resilient.h -I %t
10+
11+
// REQUIRES: objc_interop
12+
// REQUIRES: swift_stable_abi

trunk/test/PrintAsObjC/resilient-ancestry.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010
// RUN: %FileCheck %s --check-prefix=NO-STUBS < %t/resilient.h
1111
// RUN: %check-in-clang %t/resilient.h -I %t
1212

13-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -module-name resilient -emit-objc-header-path %t/resilient.h -I %t -enable-library-evolution -enable-resilient-objc-class-stubs
14-
// RUN: %FileCheck %s < %t/resilient.h
15-
// RUN: %check-in-clang %t/resilient.h -I %t
16-
1713
// REQUIRES: objc_interop
1814

15+
// See also resilient-ancestry.swift, for the stable ABI deployment target test.
16+
1917
import Foundation
2018
import resilient_objc_class
2119

trunk/test/Runtime/backtrace.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -o %t/a.out
3-
// RUN: not --crash %t/a.out 2>&1 | %{python} %utils/backtrace-check
3+
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/a.out" 2>&1 | %{python} %utils/backtrace-check
4+
5+
// NOTE: not.py is used above instead of "not --crash" because %target-run
6+
// doesn't pass through the crash, and `not` may not be available when running
7+
// on a remote host.
48

59
// This is not supported on watchos, ios, or tvos
610
// UNSUPPORTED: OS=watchos

trunk/test/Runtime/crash_without_backtrace.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -o %t/out
3-
// RUN: not --crash %t/out 2>&1 | %FileCheck %s
3+
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/out" 2>&1 | %FileCheck %s
4+
5+
// NOTE: not.py is used above instead of "not --crash" because %target-run
6+
// doesn't pass through the crash, and `not` may not be available when running
7+
// on a remote host.
48

59
// UNSUPPORTED: OS=watchos
610
// UNSUPPORTED: OS=ios

trunk/test/Runtime/crash_without_backtrace_optimized.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -O %s -o %t/out
3-
// RUN: not --crash %t/out 2>&1 | %FileCheck %s
3+
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/out" 2>&1 | %FileCheck %s
4+
5+
// NOTE: not.py is used above instead of "not --crash" because %target-run
6+
// doesn't pass through the crash, and `not` may not be available when running
7+
// on a remote host.
48

59
// UNSUPPORTED: OS=watchos
610
// UNSUPPORTED: OS=ios

trunk/test/Runtime/linux-fatal-backtrace.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -o %t/a.out
3-
// RUN: not --crash %t/a.out 2>&1 | PYTHONPATH=%lldb-python-path %{python} %utils/symbolicate-linux-fatal %t/a.out - | %{python} %utils/backtrace-check -u
3+
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/a.out" 2>&1 | PYTHONPATH=%lldb-python-path %{python} %utils/symbolicate-linux-fatal %t/a.out - | %{python} %utils/backtrace-check -u
44
// REQUIRES: executable_test
55
// REQUIRES: OS=linux-gnu
66
// REQUIRES: lldb
77

8+
// NOTE: not.py is used above instead of "not --crash" because %target-run
9+
// doesn't pass through the crash, and `not` may not be available when running
10+
// on a remote host.
11+
812
// Backtraces are not emitted when optimizations are enabled. This test can not
913
// run when optimizations are enabled.
1014
// REQUIRES: swift_test_mode_optimize_none

trunk/test/decl/protocol/conforms/nscoding.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -swift-version 4 %s -verify
44
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -swift-version 4 %s -disable-nskeyedarchiver-diagnostics 2>&1 | %FileCheck -check-prefix CHECK-NO-DIAGS %s
5-
65
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -swift-version 4 %s -dump-ast -target %target-pre-stable-abi-triple > %t/old.ast
7-
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -swift-version 4 %s -dump-ast -target %target-stable-abi-triple > %t/new.ast
86

97
// RUN: %FileCheck --check-prefix=CHECK-OLD %s < %t/old.ast
108
// RUN: %FileCheck --check-prefix=NEGATIVE %s < %t/old.ast
11-
// RUN: %FileCheck --check-prefix=NEGATIVE --check-prefix=NEGATIVE-NEW %s < %t/new.ast
129

1310
// REQUIRES: objc_interop
1411

12+
// See also nscoding_stable_abi.swift, for the stable ABI deployment
13+
// target test.
14+
1515
// CHECK-NO-DIAGS-NOT: NSCoding
1616
// CHECK-NO-DIAGS-NOT: unstable
1717

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// RUN: %empty-directory(%t)
2+
3+
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -swift-version 4 %S/nscoding.swift -dump-ast -target %target-stable-abi-triple > %t/new.ast
4+
5+
// RUN: %FileCheck --check-prefix=NEGATIVE --check-prefix=NEGATIVE-NEW %S/nscoding.swift < %t/new.ast
6+
7+
// REQUIRES: objc_interop
8+
// REQUIRES: swift_stable_abi

trunk/utils/update_checkout/update-checkout-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@
307307
"cmark": "master",
308308
"llbuild": "swift-5.1-branch",
309309
"swiftpm": "swift-5.1-branch",
310-
"swift-syntax": "swift-5.1-branch",
310+
"swift-syntax": "swift-5.1-branch-04-24-2019",
311311
"swift-stress-tester": "swift-5.1-branch",
312312
"swift-corelibs-xctest": "swift-5.1-branch",
313313
"swift-corelibs-foundation": "swift-5.1-branch",

trunk/validation-test/Reflection/inherits_ObjCClasses.swift

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

1010
// REQUIRES: objc_interop
1111
// REQUIRES: executable_test
12+
// REQUIRES: OS=macosx || OS=ios || OS=tvos
13+
// NOTE: Test is temporarily disabled for watchOS until we can figure out why
14+
// it's failing there. rdar://problem/50898688
1215

1316
import simd
1417
import ObjCClasses

0 commit comments

Comments
 (0)