Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] swiftwasm-host from master #14

Merged
merged 164 commits into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
fd98ce1
Update PassManager's function worklist for newly added SILFunctions
meg-gupta Mar 25, 2020
95c16fc
[NFC] AST: Optimize GenericSignatureImpl::getInnermostGenericParams
AnthonyLatsis May 16, 2020
f5258ed
ASTDemangler: Add support for member types of opaque result types
slavapestov May 23, 2020
8326e11
Update LLVM development policy
MForster May 25, 2020
b5392e8
Refactors internal func _applyMapping using _FixedArray16
valeriyvan Apr 26, 2020
4e227f8
[Index] Apply -index-ignore-system-modules to clang modules
kastiglione May 23, 2020
d6bf31c
[Diagnostics] Add a distinct diagnostic for missing raw representable…
xedin May 28, 2020
959c6d5
[CSFix] Move type verification out of `ExplicitlyConstructRawRepresen…
xedin May 28, 2020
20f4ef9
IRGen: Default to clang's frame pointer elimination settings
aschwaighofer May 22, 2020
bd65f74
[Diagnostics] Add fix-its to suggest explicit raw representable initi…
xedin May 28, 2020
87a0079
[Diagnostic] Always resolve types required for raw representative con…
xedin May 28, 2020
7034fb3
[Diagnostic] Add a note to missing explicit raw representative init d…
xedin May 28, 2020
66c333d
Submitting to swift/master-next is still allowed.
MForster May 29, 2020
f048652
[ConstraintSystem] Do more checking before suggesting to explicitly c…
xedin May 20, 2020
03938f9
[Diagnostics] NFC: Remove obsolete logic from `ContextualFailure::try…
xedin May 29, 2020
942d967
[CSFix] Move type verification out of `UseValueTypeOfRawRepresentative`
xedin May 29, 2020
761657f
[Diagnostics] Extract common logic for raw representable diagnostics …
xedin May 29, 2020
b38d11d
[Diagnostics] Add a distinct diagnostic for use of raw representable …
xedin May 29, 2020
cd83896
Index objcdynamic
rockbruno May 29, 2020
3e200b7
[CodeCompletion] Skip typechecking unrelated statements in func bodies
rintaro May 29, 2020
a22fd6f
[TypeChecker] Typecheck statement condition on demand
rintaro May 29, 2020
0a72d02
[TypeChecker] Rename 'typeCheckAbstractFunctionBodyUntil()'
rintaro May 29, 2020
6c61e60
[CodeCompletion] Skip typechecking preceding top level decls
rintaro May 29, 2020
0e985be
[silgen] Create a function level scope when open coding implicit valu…
gottesmm May 29, 2020
ae624f3
[gardening] Fix a double "the" in a comment
hamishknight May 29, 2020
ab6c15f
[Frontend] Bail early if the stdlib is missing
hamishknight May 29, 2020
52e13af
Add a demangler option to hide the "Swift" module name.
adrian-prantl May 29, 2020
fe93b19
Add a demangler option to hide the "__C" module name.
adrian-prantl May 30, 2020
051beca
Add a demangler option to hide a current module.
adrian-prantl May 30, 2020
2cb2760
ASTPrinter: Add an option to qualify ClangImported types.
adrian-prantl May 30, 2020
286b6cb
Visit base first
rockbruno May 30, 2020
21c9996
[ConstraintSystem][NFC] add test cases for argument matching
omochi May 30, 2020
cf9fcb9
[stdlib] Add flatMap example in Result.swift
May 31, 2020
c4690aa
stdlib: Drop a redundant generic parameter
AnthonyLatsis Jun 1, 2020
9fd1aa5
[NFC] Pre- increment and decrement where possible
AnthonyLatsis Jun 1, 2020
f5a75dc
build: simplify macOS path (NFC)
compnerd May 30, 2020
71d4c3a
Add a Test Demonstrating Superfluous Cascading Across Module Boundaries
CodaFi Jun 1, 2020
80c4aa6
[Diagnostics] NFC: Rename `ValueType` to `ExpectedType` in raw repres…
xedin Jun 1, 2020
564c1a5
Add a [nonoverridden] kind for SILVTable entries.
jckarter Jun 1, 2020
ebc99c6
[CodeCompletion] Separate TypeCheckFunctionBodyAtLocRequest
rintaro May 30, 2020
759d1dd
[TypeChecker] Merge typeCheckConditionForStmt() with
rintaro May 30, 2020
36123a7
Update a test case
rintaro May 30, 2020
e6ce361
[CodeCompletion] Rename typeCheckContextUntil to typeCheckContextAt
rintaro May 30, 2020
9805b0a
[ConstraintSystem] Do more checking before suggesting to use of `.raw…
xedin Jun 1, 2020
0e6dcab
[Diagnostics] Share `diagnoseAsNote` for raw representable diagnostics
xedin Jun 1, 2020
4d9566c
[Diagnostics] NFC: Remove obsolete logic related to raw representable
xedin Jun 1, 2020
88c82f4
change bash to sh
milrope Jun 1, 2020
bc939d7
Add regression test for https://bugs.swift.org/browse/SR-7002
slavapestov Jun 2, 2020
4f87899
Add regression test for rdar://54394068
slavapestov Jun 2, 2020
6fac5ae
Merge pull request #32103 from omochi/add-test-arg-match
omochi Jun 2, 2020
ec60746
Merge pull request #32120 from compnerd/macOS-cl
compnerd Jun 2, 2020
e60c7fe
Add request to query primary files
hamishknight Jun 2, 2020
e7f38db
[NFC] Have Evaluator's Constructor Read LangOptions
CodaFi May 28, 2020
f983d85
Merge pull request #32094 from adrian-prantl/demangler-hide-objc
adrian-prantl Jun 2, 2020
09a5c7d
Merge pull request #32099 from adrian-prantl/astprinter-qualify-imported
adrian-prantl Jun 2, 2020
267e32d
Merge pull request #32118 from AnthonyLatsis/post-increment-cleanup
AnthonyLatsis Jun 2, 2020
4804616
Fix an edge case in ExistentialSpecializer
meg-gupta Jun 1, 2020
67d8be7
Merge pull request #32087 from rockbruno/index-objcdynamic
Jun 2, 2020
fb8bfce
Merge pull request #32126 from jckarter/silvtable-nonoverridden-entries
jckarter Jun 2, 2020
2711018
test: adjust test to repair the test on Windows
compnerd Jun 2, 2020
6fa4874
Merge pull request #32089 from gottesmm/pr-305c2fadbc4ce607a2a7ff330c…
gottesmm Jun 2, 2020
118e7c3
[SymbolGraph] Inherit availability from parent contexts
bitjammer May 28, 2020
975d252
[SymbolGraph] Print where clause in full declaration fragments
bitjammer Jun 1, 2020
58e49db
[ownership] Add support for handling address_to_pointer to LoadBorrow…
gottesmm Jun 2, 2020
a4bcbfa
[NFC] Remove a Dead Parameter From Clang Module Loading
CodaFi Jun 2, 2020
c8077e8
[Gardening] Add a SourceLoc For Cross-Import Overlay Diagnostics
CodaFi Jun 2, 2020
d2e1336
[NFC] Use getWrapperForModule to Simplify Clang Module Loading
CodaFi Jun 2, 2020
f9e99ed
[Diagnostics] NFC: Align `diagnoseAsNote` with `diagnoseAsError` for …
xedin Jun 2, 2020
734f5b6
[Diagnostics] NFC: Fix typo(s) raw `representative` -> `representable`
xedin Jun 2, 2020
660384f
[semantic-arc-opts] Perform a rename/add some comments after talking …
gottesmm Jun 2, 2020
0f6665c
[Diagnostics] Adjust fix-it when `.rawValue` is missing from optional…
xedin Jun 2, 2020
0475efd
Merge pull request #32122 from CodaFi/modulality
CodaFi Jun 2, 2020
47ef155
Merge pull request #32123 from meg-gupta/fixexistspec
meg-gupta Jun 2, 2020
3144119
Invalidate binding VarDecls if the initializer fails to type check
rintaro Jun 2, 2020
ba81773
Merge pull request #32142 from compnerd/r31778
compnerd Jun 2, 2020
e1eb27a
Merge pull request #32139 from hamishknight/prime-time
hamishknight Jun 2, 2020
1bc028e
Merge pull request #32091 from hamishknight/standard-error
hamishknight Jun 2, 2020
d26f414
[CodeCompletion] Replace main module instead of file
hamishknight Jun 2, 2020
3b97b86
[CodeCompletion] Suggest 'Self' inside struct, enum and classe
rintaro May 28, 2020
aca0dce
[NFC] Use The 'isPrimary' Bit
CodaFi Jun 2, 2020
7498464
Merge pull request #32124 from bitjammer/acgarland/rdar-63234012-miss…
bitjammer Jun 2, 2020
736a848
Merge pull request #32143 from gottesmm/pr-18735e23f15ef6aaa8992016e9…
gottesmm Jun 2, 2020
3a214d9
Frontend: add an argument to disable implicitly built Swift modules
nkcsgexi Jun 1, 2020
1ae70a5
DependenciesScanner: avoid reporting output file path because build s…
nkcsgexi Jun 1, 2020
28b0b22
ModuleInterface: refactor several configuration values into an Option…
nkcsgexi Jun 1, 2020
38b3d81
ModuleInterface: pass-down explicit Swift module paths when building …
nkcsgexi Jun 1, 2020
9e88549
ModuleInterface: teach module interface building to use explicitly bu…
nkcsgexi Jun 2, 2020
01c18d0
Frontend: move ExplicitSwiftModules into SearchPathOptions, NFC
nkcsgexi Jun 2, 2020
0d74428
Front-end: use separate flag for -swift-module-file instead of EQ
nkcsgexi Jun 2, 2020
65b8cf7
Merge pull request #32086 from rintaro/ide-completion-skipbody-rdar58…
rintaro Jun 3, 2020
f21279e
Merge pull request #32053 from rintaro/ide-completion-sself-rdar61307680
rintaro Jun 3, 2020
1e0b2de
Merge pull request #32149 from CodaFi/prima-fascie
swift-ci Jun 3, 2020
83f807d
Merge pull request #32125 from nkcsgexi/add-flag-disable-swift-implicit
nkcsgexi Jun 3, 2020
9a3e2aa
Revert "Add a Test Demonstrating Superfluous Cascading Across Module …
CodaFi Jun 3, 2020
e2951c5
Merge pull request #32152 from CodaFi/a-touching-response
Catfish-Man Jun 3, 2020
8c20bcd
Merge pull request #32147 from hamishknight/modulo-module
hamishknight Jun 3, 2020
1d0065d
Merge pull request #32145 from CodaFi/port-of-call
CodaFi Jun 3, 2020
d049281
Merge pull request #32129 from milrope/patch-1
CodaFi Jun 3, 2020
f76169b
[AutoDiff] Improve Array.TangentVector precondition messages. (#32154)
dan-zheng Jun 3, 2020
f7473a7
Test C++ out-of-line operator functions (#32081)
MForster Jun 3, 2020
3f903b4
Merge pull request #31986 from aschwaighofer/irgen_inherit_clangs_fp_…
aschwaighofer Jun 3, 2020
84d376a
Merge pull request #32117 from AnthonyLatsis/redundant-generic-param
AnthonyLatsis Jun 3, 2020
a1e281d
Merge pull request #30710 from meg-gupta/bottomupfunction
meg-gupta Jun 3, 2020
b938f96
[Diagnostics] NFC: Rename a fix/diagnostic for missing `.rawValue` re…
xedin Jun 3, 2020
3126a4e
gyb: clean up some linter warnings
compnerd Jun 3, 2020
3ff520b
Merge pull request #32006 from MForster/m/upstreaming-policy
tkremenek Jun 3, 2020
b14d965
[CSGen] Allow `is` patterns to infer type from enclosing context
xedin Jun 3, 2020
492ba85
Merge pull request #32096 from adrian-prantl/demangler-hide-current-m…
adrian-prantl Jun 3, 2020
8eb5cbe
add test by @nathawes
kastiglione Jun 3, 2020
17b681b
[SourceKit] Disable complete_build_session.swift test file while inve…
rintaro Mar 25, 2020
258ceda
rename test
kastiglione Jun 3, 2020
651503b
Merge pull request #32128 from xedin/adjust-raw-representable-diag
xedin Jun 3, 2020
baa3a7d
[benchmarks] Add a benchmark for printing using mirrors (#32150)
airspeedswift Jun 3, 2020
14dd909
test: repair the test after accidental merge without testing
compnerd Jun 3, 2020
1f01103
[Index] Add regression test case for @dynamicMemberLookup on a protocol.
Jun 3, 2020
41fa19e
Merge pull request #32163 from rintaro/disable-rdar60881337
rintaro Jun 3, 2020
bd0bb64
Fix dependency scanner test-case to use explicit imports.
artemcm Jun 3, 2020
56c361a
Merge pull request #32164 from compnerd/31986
compnerd Jun 3, 2020
d3a5be4
Merge pull request #32144 from gottesmm/pr-d8ab9968bdf338be530e1fd4be…
gottesmm Jun 3, 2020
41095aa
ABI: qualify use of `StringRef` and `Optional` (NFC)
compnerd May 30, 2020
b5d6652
Merge pull request #32157 from compnerd/gyb-lint
compnerd Jun 3, 2020
8538a2a
SIL: Verify kinds of vtable entries.
jckarter Jun 3, 2020
0bed967
[semantic-arc-opts] Create an explicit composition type for "ownershi…
gottesmm Jun 3, 2020
9a93b61
[stdlib][cmake] OpenBSD target requires -lpthread.
3405691582 Jun 4, 2020
d992e04
Merge pull request #32167 from artemcm/FixFDSTestImplicitImports
nkcsgexi Jun 4, 2020
bd782be
Front-end: add a new module loader that loads explicitly built Swift …
nkcsgexi Jun 3, 2020
ebf291c
[memory-lifetime] Teach the verifier that select_enum_addr doesn't wr…
gottesmm Jun 4, 2020
5808893
Merge pull request #32172 from gottesmm/pr-58e5e110fe11cabaa1d7907753…
gottesmm Jun 4, 2020
3cb33ac
[semantic-arc-opts] Teach semantic-arc-opts how to handle structs wit…
gottesmm Jun 3, 2020
96a5c81
Merge pull request #32170 from nkcsgexi/explicit-module-loader
nkcsgexi Jun 4, 2020
690d6c4
[AST] Record whether a closure was type-checked in its enclosing expr…
DougGregor Jun 4, 2020
f55e764
[Constaint system] Add a predicate for when to check closures in encl…
DougGregor Jun 4, 2020
e11f167
Merge pull request #32165 from nathawes/add-regression-test-for-dynam…
Jun 4, 2020
5311021
Merge pull request #32024 from kastiglione/dl/index-apply--index-igno…
Jun 4, 2020
ad42d47
[AST] Remove some pointless uses of hasSingleExpressionBody().
DougGregor Jun 4, 2020
ffe471a
[stdlib] Add flatMap example in Result.swift
Jun 4, 2020
f2fb539
[Runtime] Unify debug variable parsing from the environment and avoid…
mikeash Jun 2, 2020
66311e1
Merge pull request #32115 from eunjiChung/example-result
swift-ci Jun 4, 2020
f9128ba
build: use the same pattern for detecting Darwin platforms
compnerd Apr 25, 2020
23bfee2
runtime: silence -Wunused-variable warning (NFC)
compnerd Jun 4, 2020
a813610
Merge pull request #32176 from 3405691582/Port_OpenBSD_RequiresLinkPt…
compnerd Jun 4, 2020
9a61985
Merge pull request #32171 from jckarter/vtable-kind-validation
jckarter Jun 4, 2020
4e0fad8
Add note that LLDB changes should be cherry-picked to `swift/master` …
martinboehme Jun 4, 2020
e5e34fa
Revert "Test C++ out-of-line operator functions (#32081)" (#32181)
MForster Jun 4, 2020
8e6840d
Merge pull request #32178 from DougGregor/single-expression-closure-c…
DougGregor Jun 4, 2020
7c8d860
Merge pull request #32093 from bitjammer/acgarland/rdar-63738390-inhe…
bitjammer Jun 4, 2020
5e1eadc
Merge pull request #32169 from compnerd/qualified-llvm-support
compnerd Jun 4, 2020
9357c85
Merge pull request #31838 from AnthonyLatsis/o-getinnermostgps
CodaFi Jun 4, 2020
d3e64ed
Merge pull request #32173 from gottesmm/pr-5e5960b7d932ff90a03c93f1ba…
gottesmm Jun 4, 2020
2f3a0f0
Merge pull request #32159 from xedin/rdar-63510989
xedin Jun 4, 2020
9ceb9ff
Merge pull request #32183 from compnerd/path-unification
compnerd Jun 4, 2020
8ea7009
Merge pull request #32177 from gottesmm/pr-f5820e0408ca527e9c54f4b3c4…
gottesmm Jun 4, 2020
a99d7ea
Merge pull request #31333 from valeriyvan/_applyMappingUnicodeScalarP…
xwu Jun 4, 2020
b25dab2
Merge pull request #32137 from mikeash/debug-environment-variables
mikeash Jun 4, 2020
e9548b0
Merge pull request #32182 from compnerd/uniformity
compnerd Jun 4, 2020
158332c
runtime: remove `llvm/DataTypes.h`, `llvm-c/DataTypes.h`
compnerd Jun 4, 2020
bdfe1b1
[Parse] Avoid delayed member parsing for type decl with missing brace
rintaro Jun 4, 2020
67791cc
[docs] Add a how-to guide on running IWYU on the Swift project. (#32151)
varungandhi-apple Jun 4, 2020
09ea5fd
[docs] Add module build related definitions to Lexicon. (#32153)
varungandhi-apple Jun 4, 2020
ea7a33c
Merge pull request #32191 from rintaro/parser-missing-memberdeclbrace…
rintaro Jun 5, 2020
fc7bdf8
Merge pull request #32188 from compnerd/types
compnerd Jun 5, 2020
32e1d22
Merge pull request #31989 from slavapestov/demangle-nested-type-of-op…
slavapestov Jun 5, 2020
db44a8e
Merge pull request #32132 from slavapestov/a-couple-of-regression-tests
slavapestov Jun 5, 2020
0838a65
Test C++ out-of-line operator functions
MForster Jun 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ set(SWIFT_BENCH_MODULES
single-source/LuhnAlgoLazy
single-source/MapReduce
single-source/Memset
single-source/Mirror
single-source/MonteCarloE
single-source/MonteCarloPi
single-source/NSDictionaryCastToSwift
Expand Down
105 changes: 105 additions & 0 deletions benchmark/single-source/Mirror.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
//===--- Mirror.swift ------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

// This test measures performance of Mirror and related things.
import TestsUtils

public let TypeName = BenchmarkInfo(
name: "TypeName",
runFunction: run_TypeName,
tags: [.api, .String])

public let MirrorDefault = BenchmarkInfo(
name: "MirrorDefault",
runFunction: run_MirrorDefault,
tags: [.api, .String])

struct S1 { var s: String; var d: Double }
struct S2 { var i: Int; var a: [Range<Int>] }

class C { var i: Int = 0 }
class D: C { var s: String = "" }

enum E {
case a,b(Int)
}

struct G<T> { var t: T }
class H<T>: C { var t: T; init(_ t: T) { self.t = t }}

public func run_MirrorDefault(scale: Int) {
let N = 100*scale

let s1 = S1(s: "foo", d: 3.14)
let s2 = S2(i: 42, a: [0..<4])
let c = C()
let d = D()
let e = E.a
let f = E.b(99)
let g = G(t: 12.3)
let h = H<[Int]>([1,2,3])

var str = ""

for _ in 0..<N {
str = "\(s1),\(s2),\(c),\(d),\(e),\(f),\(g),\(h)"
blackHole(str)
}

CheckResults(str ==
"S1(s: \"foo\", d: 3.14),S2(i: 42, a: [Range(0..<4)]),Mirror.C,Mirror.D,a,b(99),G<Double>(t: 12.3),Mirror.H<Swift.Array<Swift.Int>>")
}

func typename<T>(of: T.Type) -> String {
"\(T.self)"
}

public func run_TypeName(scale: Int) {
let N = 1_000*scale
var a: [String] = []
a.reserveCapacity(16)

for _ in 0..<N {
a = []
a.removeAll(keepingCapacity: true)
a.append(typename(of: S1.self))
a.append(typename(of: S2.self))
a.append(typename(of: C.self))
a.append(typename(of: D.self))
a.append(typename(of: G<S1>.self))
a.append(typename(of: G<C>.self))
a.append(typename(of: G<String>.self))
a.append(typename(of: H<Int>.self))
a.append(typename(of: [S1].self))
a.append(typename(of: [G<Int>].self))
a.append(typename(of: [H<S1>].self))
a.append(typename(of: S1?.self))
a.append(typename(of: C?.self))
blackHole(a)
}

let expected = ["S1",
"S2",
"C",
"D",
"G<S1>",
"G<C>",
"G<String>",
"H<Int>",
"Array<S1>",
"Array<G<Int>>",
"Array<H<S1>>",
"Optional<S1>",
"Optional<C>",
]
CheckResults(a == expected)
}
3 changes: 3 additions & 0 deletions benchmark/utils/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ import LuhnAlgoEager
import LuhnAlgoLazy
import MapReduce
import Memset
import Mirror
import MonteCarloE
import MonteCarloPi
import NibbleSort
Expand Down Expand Up @@ -281,6 +282,7 @@ registerBenchmark(LuhnAlgoEager)
registerBenchmark(LuhnAlgoLazy)
registerBenchmark(MapReduce)
registerBenchmark(Memset)
registerBenchmark(MirrorDefault)
registerBenchmark(MonteCarloE)
registerBenchmark(MonteCarloPi)
registerBenchmark(NSDictionaryCastToSwift)
Expand Down Expand Up @@ -366,6 +368,7 @@ registerBenchmark(Suffix)
registerBenchmark(SuperChars)
registerBenchmark(TwoSum)
registerBenchmark(TypeFlood)
registerBenchmark(TypeName)
registerBenchmark(UTF8Decode)
registerBenchmark(Walsh)
registerBenchmark(WordCount)
Expand Down
33 changes: 7 additions & 26 deletions cmake/modules/AddSwift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,25 +75,10 @@ function(_set_target_prefix_and_suffix target kind sdk)
endif()
endfunction()

function(is_darwin_based_sdk sdk_name out_var)
if ("${sdk_name}" STREQUAL "OSX" OR
"${sdk_name}" STREQUAL "IOS" OR
"${sdk_name}" STREQUAL "IOS_SIMULATOR" OR
"${sdk_name}" STREQUAL "TVOS" OR
"${sdk_name}" STREQUAL "TVOS_SIMULATOR" OR
"${sdk_name}" STREQUAL "WATCHOS" OR
"${sdk_name}" STREQUAL "WATCHOS_SIMULATOR")
set(${out_var} TRUE PARENT_SCOPE)
else()
set(${out_var} FALSE PARENT_SCOPE)
endif()
endfunction()

# Usage:
# _add_host_variant_c_compile_link_flags(name)
function(_add_host_variant_c_compile_link_flags name)
is_darwin_based_sdk("${SWIFT_HOST_VARIANT_SDK}" IS_DARWIN)
if(IS_DARWIN)
if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
set(DEPLOYMENT_VERSION "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_DEPLOYMENT_VERSION}")
endif()

Expand All @@ -107,7 +92,7 @@ function(_add_host_variant_c_compile_link_flags name)

set(_sysroot
"${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_ARCH_${SWIFT_HOST_VARIANT_ARCH}_PATH}")
if(IS_DARWIN)
if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
target_compile_options(${name} PRIVATE -isysroot;${_sysroot})
elseif(NOT SWIFT_COMPILER_IS_MSVC_LIKE AND NOT "${_sysroot}" STREQUAL "/")
target_compile_options(${name} PRIVATE --sysroot=${_sysroot})
Expand All @@ -122,7 +107,7 @@ function(_add_host_variant_c_compile_link_flags name)
endif()
endif()

if(IS_DARWIN)
if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
# We collate -F with the framework path to avoid unwanted deduplication
# of options by target_compile_options -- this way no undesired
# side effects are introduced should a new search path be added.
Expand Down Expand Up @@ -546,14 +531,10 @@ function(add_swift_host_library name)
"LINKER:-current_version,${SWIFT_COMPILER_VERSION}")
endif()

set(DEPLOYMENT_VERSION "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_DEPLOYMENT_VERSION}")
# MSVC, clang-cl, gcc don't understand -target.
if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT SWIFT_COMPILER_IS_MSVC_LIKE)
get_target_triple(target target_variant "${SWIFT_HOST_VARIANT_SDK}" "${SWIFT_HOST_VARIANT_ARCH}"
MACCATALYST_BUILD_FLAVOR ""
DEPLOYMENT_VERSION "${DEPLOYMENT_VERSION}")
target_link_options(${name} PRIVATE -target;${target})
endif()
get_target_triple(target target_variant "${SWIFT_HOST_VARIANT_SDK}" "${SWIFT_HOST_VARIANT_ARCH}"
MACCATALYST_BUILD_FLAVOR ""
DEPLOYMENT_VERSION "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_DEPLOYMENT_VERSION}")
target_link_options(${name} PRIVATE -target;${target})
endif()

add_dependencies(dev ${name})
Expand Down
19 changes: 13 additions & 6 deletions docs/Branches.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,22 @@ You can use any of the branch names as the argument to `--scheme`, such as `mast

- LLVM Project: the destination branch depends on the kind of change that must be made:

1) LLVM Project changes that don't depend on Swift: New commits go to `master` in the upstream [llvm-project](https://github.com/llvm/llvm-project).
1) LLVM Project changes that don't depend on Swift

- New commits go to `master` in the upstream [llvm-project](https://github.com/llvm/llvm-project).

... then these commits can be cherry-picked to an appropriate, `swift/master` aligned `apple/stable/*` branch in Apple's fork of [llvm-project](https://github.com/apple/llvm-project). Please see
[Apple's branching scheme](https://github.com/apple/llvm-project/blob/apple/master/apple-docs/AppleBranchingScheme.md)
document to determine which `apple/stable/*` branch you should cherry-pick to.
- Then cherry-pick these commits to an appropriate, `swift/master` aligned `apple/stable/*` branch in Apple's fork of [llvm-project](https://github.com/apple/llvm-project). Please see [Apple's branching scheme](https://github.com/apple/llvm-project/blob/apple/master/apple-docs/AppleBranchingScheme.md) document to determine which `apple/stable/*` branch you should cherry-pick to.

Note that **no new changes should be submitted directly to `apple/master`**. We are actively working on eliminating the differences from upstream LLVM.

2) Changes that depend on Swift (this only applies to LLDB): new commits go to `swift/master-next`
2) Changes that depend on Swift (this only applies to LLDB)
- New commits go to `swift/master` (_not_ an `apple/stable/*` branch, as these shouldn't contain changes that depend on Swift).

...then cherry-pick to the release branch (`swift/swift-x.y-branch`) if necessary, following the appropriate release process. (Usually this means filling out a standard template, finding someone to review your code if that hasn't already happened, and getting approval from that repo's *release manager.)*
- Then cherry-pick these commits to `swift/master-next`.

- If necessary, cherry-pick to the release branch (`swift/release/x.y`), following the appropriate release process. (Usually this means filling out a standard template, finding someone to review your code if that hasn't already happened, and getting approval from that repo's *release manager.)*

In the long term we want to eliminate the differences from upstream LLVM for these changes as well, but for now there is no concrete plan. So, submitting to `swift/master-next` continues to be allowed.

## Automerging

Expand Down
14 changes: 7 additions & 7 deletions docs/DebuggingTheCompiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ Here is how to dump the IR after the main phases of the Swift compiler

* **Parser** To print the AST after parsing:

```bash
```sh
swiftc -dump-ast -O file.swift
```

* **SILGen** To print the SIL immediately after SILGen:

```bash
```sh
swiftc -emit-silgen -O file.swift
```

* **Mandatory SIL passes** To print the SIL after the mandatory passes:

```bash
```sh
swiftc -emit-sil -Onone file.swift
```

Expand All @@ -87,25 +87,25 @@ swiftc -emit-sil -Onone file.swift
* **Performance SIL passes** To print the SIL after the complete SIL
optimization pipeline:

```bash
```sh
swiftc -emit-sil -O file.swift
```

* **IRGen** To print the LLVM IR after IR generation:

```bash
```sh
swiftc -emit-ir -Xfrontend -disable-llvm-optzns -O file.swift
```

* **LLVM passes** To print the LLVM IR after LLVM passes:

```bash
```sh
swiftc -emit-ir -O file.swift
```

* **Code generation** To print the final generated code:

```bash
```sh
swiftc -S -O file.swift
```

Expand Down
Loading