Skip to content

Fix issues when merging the main branch #3032

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

Merged
merged 71 commits into from
Apr 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
5110a4b
[test] Mark these tests unsupported like Linux.
3405691582 Feb 4, 2021
091e5af
[Sema] Print the library-level in the textual interface
xymus Mar 30, 2021
aa69529
[AST] Add method to create an implicit `SwitchStmt`
ahoppen Apr 20, 2021
7583511
[Sema] Allow the use of SPI in API for SPI modules
xymus Mar 24, 2021
a8fa3ba
Added helper variables and methods for SwiftSyntax gyb
kimdv Apr 2, 2021
7508786
[Testing] Unbreak minimal Swift builds
davezarzycki Apr 21, 2021
8f76815
[inst-opt-utils] If InstModCallback::setUseValueFunc isn't set, just …
gottesmm Apr 22, 2021
c3c2b84
[ownership] Change CanonicalOSSALifetime to use an InstModCallback.
gottesmm Apr 21, 2021
3c3f216
[Concurrency] Add "async" operation for continuing work asynchronously.
DougGregor Apr 22, 2021
efd413a
Merge pull request #36726 from kimdv/kimdv/add-more-properties-to-hel…
ahoppen Apr 22, 2021
1504870
Merge pull request #36973 from ahoppen/pr/create-implicit-switch-stmt
ahoppen Apr 22, 2021
9d62f9d
[Refactoring] Fix crash when refactoring protocol requirement to async
ahoppen Apr 21, 2021
a7c24c5
Merge pull request #36990 from davezarzycki/pr36990
davezarzycki Apr 22, 2021
cd6e1af
Merge pull request #37006 from gottesmm/pr-955048d8049271e67347326b8d…
gottesmm Apr 22, 2021
71fd7f9
Merge pull request #37003 from gottesmm/pr-af8aa6d23b297a3ff4a3237f2d…
gottesmm Apr 22, 2021
ab2fdbb
[Deserialization] Fix error when typealias required by protocol refer…
ahoppen Apr 22, 2021
16adf76
Merge pull request #36994 from ahoppen/pr/refactor-protocol-requireme…
ahoppen Apr 22, 2021
fbc6237
Work around lack of qos_class_self in non-Darwin libdispatch
DougGregor Apr 22, 2021
181ffaf
Fix a typo in async comment
DougGregor Apr 22, 2021
4194838
Revert "[Driver][Frontend] add the symbol graph dir to the supplement…
QuietMisdreavus Apr 22, 2021
3891dc7
[ConstraintSystem] Added necessary logic so that a constraint locator…
Strieker Mar 30, 2021
11efb7d
[Diagnostics] Added new diagnostic error string for composed property…
Strieker Apr 10, 2021
c9b53ec
[ConstraintSystem] Created a locator in CSGen to store the location w…
Strieker Apr 1, 2021
b732319
[NFC] Fixed and added property wrapper tests.
Strieker Apr 10, 2021
b3f0442
[ConstraintSystem] Modified CSGen.cpp in order to resolve a failing t…
Strieker Apr 9, 2021
4e2b67c
[NFC] Resolved merge conflict in CSSimplify.cpp after making changes …
Strieker Apr 22, 2021
623e54f
Merge pull request #37007 from DougGregor/async-operation
DougGregor Apr 22, 2021
87fe71e
fix SymbolGraph/EmitWhileBuilding output map
QuietMisdreavus Apr 22, 2021
44d06a7
[Runtime] Remove the _swift_classIsSwiftMask variable.
mikeash Apr 22, 2021
f92abb8
Verify that `_Concurrency` *can* be imported on implicit import.
artemcm Apr 22, 2021
cdd6ad8
Introduce a feature for `@_inheritActorContext`
DougGregor Apr 22, 2021
48ddcdc
[TaskGroup] add simple test to group asynciterator test
ktoso Apr 22, 2021
ff2b2ce
Update async_taskgroup_asynciterator_semantics.swift
ktoso Apr 22, 2021
0d5ec20
[Concurrency] Put Builtin.Executor type behind a feature flag.
DougGregor Apr 22, 2021
c0394f6
Merge pull request #36996 from xymus/lib-access-level-spi-in-api
xymus Apr 22, 2021
5cb9227
Merge pull request #37005 from artemcm/OldSDKNoConcurrency
artemcm Apr 23, 2021
e71a885
[Concurrency] Deprecate Task.current and instance properties
ktoso Apr 23, 2021
3c61374
Merge pull request #37019 from DougGregor/inherit-actor-context-feature
swift-ci Apr 23, 2021
1e63681
Merge pull request #37021 from apple/ktoso-patch-3
swift-ci Apr 23, 2021
a11acd3
Merge pull request #37023 from DougGregor/builtin-executor-feature
swift-ci Apr 23, 2021
3c05316
Merge pull request #37025 from ktoso/wip-task-deprecate
swift-ci Apr 23, 2021
b5a01ba
Support for x86_64 watchOS simulator
shahmishal Apr 23, 2021
72fc506
"modified existing validation test after improving error handling for…
Strieker Apr 23, 2021
619226b
Fix calling convention mismatch on `Builtin.getCurrentAsyncTask` (#37…
kateinoigakukun Apr 23, 2021
7cc19b5
[SE-0306] Require 'nonisolated' on lets for synchronous cross-actor a…
DougGregor Apr 23, 2021
106f5a8
Merge pull request #37033 from DougGregor/nonisolated-let
swift-ci Apr 23, 2021
eecb9fa
SILModule: track opened archetypes per function.
eeckstein Apr 23, 2021
2392e79
[CodeCompletion] Fix code suggestions for arguments in vararg followe…
ahoppen Apr 23, 2021
22ef406
Merge pull request #37018 from mikeash/remove-dynamic-class-is-swift-…
mikeash Apr 23, 2021
eb60c7c
Runtime: Fix async dynamic replacements
aschwaighofer Apr 23, 2021
40b5aa0
Merge pull request #37036 from eeckstein/fix-open-archetype-mapping
eeckstein Apr 23, 2021
1f890dc
IRGen: Fix async dynamic replacements
aschwaighofer Apr 23, 2021
5a7fd68
Merge pull request #36732 from Strieker/composed_property_wrapper_imp…
xedin Apr 23, 2021
87e7c1c
Re-enable test/Interpreter/async.swift on arm64e
aschwaighofer Apr 23, 2021
7a57818
Merge pull request #37017 from apple/revert-36542-QuietMisdreavus/sup…
QuietMisdreavus Apr 23, 2021
7169ab1
Enable import_as_member.swift test (#37031)
shahmishal Apr 23, 2021
2b435f9
Merge pull request #37042 from aschwaighofer/reenable_test_interprete…
swift-ci Apr 23, 2021
727c11d
Merge pull request #37037 from ahoppen/pr/vararg-label-completion
ahoppen Apr 23, 2021
aa78216
Merge pull request #37011 from ahoppen/pr/deserialization-error
ahoppen Apr 23, 2021
5e91dea
Merge pull request #37038 from aschwaighofer/fix_async_dyn_repl_runtime
aschwaighofer Apr 23, 2021
e50d5c3
Merge pull request #37039 from aschwaighofer/fix_async_dyn_repl_compiler
aschwaighofer Apr 23, 2021
b88e678
[SE-0306] Disable actor inheritance.
DougGregor Apr 23, 2021
3116eed
Update the branch to build with Xcode 12.5 (#37046)
shahmishal Apr 23, 2021
2d702b8
[ConstraintGraph] Fix typo
eltociear Apr 24, 2021
16532e3
Merge pull request #35759 from 3405691582/DispatchTestsUnsupported
swift-ci Apr 24, 2021
c9b880d
Merge pull request #37055 from eltociear/patch-15
xedin Apr 24, 2021
b851974
[Sema] Do not attempt warn extraneous checked cast for placeholder types
LucianoPAlmeida Apr 25, 2021
02821fd
Merge pull request #37053 from DougGregor/disable-actor-inheritance
DougGregor Apr 25, 2021
c15dde4
Merge pull request #37057 from LucianoPAlmeida/placeholder-checkedcas…
LucianoPAlmeida Apr 25, 2021
b81162c
Merge branch 'main' of github.com:apple/swift into maxd/main-merge
MaxDesiatov Apr 25, 2021
5d14b0a
Aviod including Dispatch headers on WASI
MaxDesiatov Apr 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/modules/DarwinSDKs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ endif()
set(SUPPORTED_TVOS_ARCHS "arm64")
set(SUPPORTED_TVOS_SIMULATOR_ARCHS "x86_64;arm64")
set(SUPPORTED_WATCHOS_ARCHS "armv7k;arm64_32")
set(SUPPORTED_WATCHOS_SIMULATOR_ARCHS "i386;arm64")
set(SUPPORTED_WATCHOS_SIMULATOR_ARCHS "i386;x86_64;arm64")
set(SUPPORTED_OSX_ARCHS "x86_64;arm64;arm64e")

is_sdk_requested(OSX swift_build_osx)
Expand Down
3 changes: 3 additions & 0 deletions include/swift/ABI/Metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -4897,6 +4897,9 @@ struct DynamicReplacementKey {
uint16_t getExtraDiscriminator() const {
return flags & 0x0000FFFF;
}
bool isAsync() const {
return ((flags >> 16 ) & 0x1);
}
};

/// A record describing a dynamic function replacement.
Expand Down
8 changes: 8 additions & 0 deletions include/swift/AST/ASTContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,13 @@ class ASTContext final {
/// If there is no Clang module loader, returns a null pointer.
/// The loader is owned by the AST context.
ClangModuleLoader *getDWARFModuleLoader() const;

/// Check whether the module with a given name can be imported without
/// importing it.
///
/// Note that even if this check succeeds, errors may still occur if the
/// module is loaded in full.
bool canImportModuleImpl(ImportPath::Element ModulePath) const;
public:
namelookup::ImportCache &getImportCache() const;

Expand Down Expand Up @@ -914,6 +921,7 @@ class ASTContext final {
/// Note that even if this check succeeds, errors may still occur if the
/// module is loaded in full.
bool canImportModule(ImportPath::Element ModulePath);
bool canImportModule(ImportPath::Element ModulePath) const;

/// \returns a module with a given name that was already loaded. If the
/// module was not loaded, returns nullptr.
Expand Down
3 changes: 3 additions & 0 deletions include/swift/AST/DiagnosticsFrontend.def
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ ERROR(cannot_emit_ir_skipping_function_bodies,none,
WARNING(emit_reference_dependencies_without_primary_file,none,
"ignoring -emit-reference-dependencies (requires -primary-file)", ())

WARNING(warn_implicit_concurrency_import_failed,none,
"unable to perform implicit import of \"_Concurrency\" module: no such module found", ())

ERROR(error_module_name_required,none, "-module-name is required", ())
ERROR(error_bad_module_name,none,
"module name \"%0\" is not a valid identifier"
Expand Down
24 changes: 9 additions & 15 deletions include/swift/AST/DiagnosticsSema.def
Original file line number Diff line number Diff line change
Expand Up @@ -4351,8 +4351,8 @@ NOTE(objc_ambiguous_async_convention_candidate,none,
ERROR(async_objc_dynamic_self,none,
"asynchronous method returning 'Self' cannot be '@objc'", ())

ERROR(actor_with_nonactor_superclass,none,
"actor cannot inherit from non-actor class %0", (DeclName))
ERROR(actor_inheritance,none,
"actor types do not support inheritance", ())

ERROR(actor_isolated_non_self_reference,none,
"actor-isolated %0 %1 can only be %select{referenced|mutated|used 'inout'}3 "
Expand Down Expand Up @@ -4426,6 +4426,9 @@ NOTE(actor_isolated_sync_func,none,
NOTE(actor_mutable_state,none,
"mutation of this %0 is only permitted within the actor",
(DescriptiveDeclKind))
NOTE(actor_isolated_let,none,
"use `nonisolated` to allow synchronous access to 'let' from outside "
"the actor", ())
WARNING(shared_mutable_state_access,none,
"reference to %0 %1 is not concurrency-safe because it involves "
"shared mutable state", (DescriptiveDeclKind, DeclName))
Expand Down Expand Up @@ -4458,13 +4461,12 @@ WARNING(non_concurrent_property_type,none,
WARNING(non_concurrent_keypath_capture,none,
"cannot form key path that captures non-sendable type %0",
(Type))
WARNING(non_concurrent_keypath_access,none,
"cannot form key path that accesses non-sendable type %0",
(Type))
ERROR(non_concurrent_type_member,none,
"%select{stored property %1|associated value %1}0 of "
"'Sendable'-conforming %2 %3 has non-sendable type %4",
(bool, DeclName, DescriptiveDeclKind, DeclName, Type))
ERROR(non_sendable_nonisolated_let,none,
"non-isolated let property %0 has non-Sendable type %1", (DeclName, Type))
ERROR(concurrent_value_class_mutable_property,none,
"stored property %0 of 'Sendable'-conforming %1 %2 is mutable",
(DeclName, DescriptiveDeclKind, DeclName))
Expand All @@ -4480,21 +4482,13 @@ ERROR(concurrent_value_inherit,none,
"%select{| other than 'NSObject'}0",
(bool, DeclName))

ERROR(actorindependent_let,none,
"'@actorIndependent' is meaningless on 'let' declarations because "
"they are immutable",
())
ERROR(actorindependent_mutable_storage,none,
"'@actorIndependent' can not be applied to stored properties",
())
ERROR(actorindependent_local_var,none,
"'@actorIndependent' can not be applied to local variables",
())

ERROR(nonisolated_let,none,
"'nonisolated' is meaningless on 'let' declarations because "
"they are immutable",
())
ERROR(nonisolated_mutable_storage,none,
"nonisolated' can not be applied to stored properties",
())
Expand Down Expand Up @@ -5678,8 +5672,8 @@ ERROR(wrapped_value_mismatch, none,
"property type %0 does not match 'wrappedValue' type %1",
(Type, Type))
ERROR(composed_property_wrapper_mismatch, none,
"composed wrapper type %0 does not match former 'wrappedValue' type %1",
(Type, Type))
"composed wrapper type %0 does not match type of '%1.wrappedValue', which is %2",
(Type, StringRef, Type))

ERROR(property_wrapper_type_access,none,
"%select{%select{variable|constant}0|property}1 "
Expand Down
11 changes: 10 additions & 1 deletion include/swift/AST/Stmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,16 @@ class SwitchStmt final : public LabeledStmt,
SourceLoc RBraceLoc,
SourceLoc EndLoc,
ASTContext &C);


static SwitchStmt *createImplicit(LabeledStmtInfo LabelInfo,
Expr *SubjectExpr, ArrayRef<ASTNode> Cases,
ASTContext &C) {
return SwitchStmt::create(LabelInfo, /*SwitchLoc=*/SourceLoc(), SubjectExpr,
/*LBraceLoc=*/SourceLoc(), Cases,
/*RBraceLoc=*/SourceLoc(), /*EndLoc=*/SourceLoc(),
C);
}

/// Get the source location of the 'switch' keyword.
SourceLoc getSwitchLoc() const { return SwitchLoc; }
/// Get the source location of the opening brace.
Expand Down
2 changes: 2 additions & 0 deletions include/swift/Basic/Features.def
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ LANGUAGE_FEATURE(RethrowsProtocol, 0, "@rethrows protocol", true)
LANGUAGE_FEATURE(GlobalActors, 0, "Global actors", langOpts.EnableExperimentalConcurrency)
LANGUAGE_FEATURE(BuiltinJob, 0, "Builtin.Job type", true)
LANGUAGE_FEATURE(Sendable, 0, "Sendable and @Sendable", true)
LANGUAGE_FEATURE(BuiltinExecutor, 0, "Executor builtins", true)
LANGUAGE_FEATURE(BuiltinContinuation, 0, "Continuation builtins", true)
LANGUAGE_FEATURE(BuiltinTaskGroup, 0, "TaskGroup builtins", true)
LANGUAGE_FEATURE(InheritActorContext, 0, "@_inheritActorContext attribute", true)

#undef LANGUAGE_FEATURE
2 changes: 0 additions & 2 deletions include/swift/Basic/FileTypes.def
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ TYPE("index-unit-output-path", IndexUnitOutputPath, "", "")
TYPE("yaml-opt-record", YAMLOptRecord, "opt.yaml", "")
TYPE("bitstream-opt-record",BitstreamOptRecord, "opt.bitstream", "")

TYPE("symbol-graph-output-path", SymbolGraphOutputPath, "", "")

// Overlay files declare wrapper modules, called "separately-imported overlays",
// that should be automatically imported when a particular module is imported.
// Cross-import directories conditionalize overlay files so they only take
Expand Down
8 changes: 1 addition & 7 deletions include/swift/Basic/SupplementaryOutputPaths.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ struct SupplementaryOutputPaths {

/// The path to which we should emit module summary file.
std::string ModuleSummaryOutputPath;

/// The directory to which we should emit symbol graphs for the current module.
std::string SymbolGraphOutputDir;

SupplementaryOutputPaths() = default;
SupplementaryOutputPaths(const SupplementaryOutputPaths &) = default;
Expand Down Expand Up @@ -189,8 +186,6 @@ struct SupplementaryOutputPaths {
fn(LdAddCFilePath);
if (!ModuleSummaryOutputPath.empty())
fn(ModuleSummaryOutputPath);
if (!SymbolGraphOutputDir.empty())
fn(SymbolGraphOutputDir);
}

bool empty() const {
Expand All @@ -199,8 +194,7 @@ struct SupplementaryOutputPaths {
ReferenceDependenciesFilePath.empty() &&
SerializedDiagnosticsPath.empty() && LoadedModuleTracePath.empty() &&
TBDPath.empty() && ModuleInterfaceOutputPath.empty() &&
ModuleSourceInfoOutputPath.empty() && LdAddCFilePath.empty() &&
SymbolGraphOutputDir.empty();
ModuleSourceInfoOutputPath.empty() && LdAddCFilePath.empty();
}
};
} // namespace swift
Expand Down
5 changes: 0 additions & 5 deletions include/swift/Driver/Driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,6 @@ class Driver {
const TypeToPathMap *OutputMap,
StringRef workingDirectory,
CommandOutput *Output) const;

void chooseSymbolGraphOutputPath(Compilation &C,
const TypeToPathMap *OutputMap,
StringRef workingDirectory,
CommandOutput *Output) const;

void chooseLoadedModuleTracePath(Compilation &C,
StringRef workingDirectory,
Expand Down
8 changes: 8 additions & 0 deletions include/swift/Frontend/Frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,14 @@ class CompilerInstance {
return getMainModule()->getPrimarySourceFiles();
}

/// Verify that if an implicit import of the `Concurrency` module if expected,
/// it can actually be imported. Emit a warning, otherwise.
void verifyImplicitConcurrencyImport();

/// Whether the Swift Concurrency support library can be imported
/// i.e. if it can be found.
bool canImportSwiftConcurrency() const;

/// Gets the SourceFile which is the primary input for this CompilerInstance.
/// \returns the primary SourceFile, or nullptr if there is no primary input;
/// if there are _multiple_ primary inputs, fails with an assertion.
Expand Down
2 changes: 1 addition & 1 deletion include/swift/Option/FrontendOptions.td
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def disable_swift3_objc_inference :

def library_level : Separate<["-"], "library-level">,
MetaVarName<"<level>">,
Flags<[FrontendOption]>,
Flags<[FrontendOption, ModuleInterfaceOption]>,
HelpText<"Library distribution level 'api', 'spi' or 'other' (the default)">;

def enable_implicit_dynamic : Flag<["-"], "enable-implicit-dynamic">,
Expand Down
45 changes: 0 additions & 45 deletions include/swift/Runtime/BackDeployment.h

This file was deleted.

10 changes: 10 additions & 0 deletions include/swift/Runtime/Bincompat.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,18 @@ namespace bincompat {

/// Whether protocol conformance iteration should be reversed, to prefer
/// conformances from images that are later in the list over earlier ones.
/// Default is false starting with Swift 5.4.
bool workaroundProtocolConformanceReverseIteration();

/// Whether we should crash when we encounter a non-nullable Obj-C
/// reference with a null value as the source of a cast.
/// Default is true starting with Swift 5.4.
bool unexpectedObjCNullWhileCastingIsFatal();

/// Whether we should use the legacy semantics for casting nil optionals
/// to nested optionals
bool useLegacyOptionalNilInjection();

} // namespace bincompat

} // namespace runtime
Expand Down
4 changes: 4 additions & 0 deletions include/swift/Runtime/Concurrency.h
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,10 @@ SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
void swift_task_reportUnexpectedExecutor(
const unsigned char *file, uintptr_t fileLength, bool fileIsASCII,
uintptr_t line, ExecutorRef executor);

SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
JobPriority swift_task_getCurrentThreadPriority(void);

}

#pragma clang diagnostic pop
Expand Down
27 changes: 7 additions & 20 deletions include/swift/Runtime/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,34 +100,21 @@
/// from ObjC classes?
#ifndef SWIFT_CLASS_IS_SWIFT_MASK

// Non-Apple platforms always use 1.
# if !defined(__APPLE__)
# define SWIFT_CLASS_IS_SWIFT_MASK 1ULL

// Builds for Swift-in-the-OS always use 2.
# elif SWIFT_BNI_OS_BUILD
# define SWIFT_CLASS_IS_SWIFT_MASK 2ULL

// Builds for Xcode always use 1.
# elif SWIFT_BNI_XCODE_BUILD
# define SWIFT_CLASS_IS_SWIFT_MASK 1ULL

// Compatibility hook libraries cannot rely on the "is swift" bit being either
// value, since they must work with both OS and Xcode versions of the libraries.
// Generate a reference to a nonexistent symbol so that we get obvious linker
// errors if we try.
# elif SWIFT_COMPATIBILITY_LIBRARY
# if SWIFT_COMPATIBILITY_LIBRARY
extern uintptr_t __COMPATIBILITY_LIBRARIES_CANNOT_CHECK_THE_IS_SWIFT_BIT_DIRECTLY__;
# define SWIFT_CLASS_IS_SWIFT_MASK __COMPATIBILITY_LIBRARIES_CANNOT_CHECK_THE_IS_SWIFT_BIT_DIRECTLY__

// Other builds (such as local builds on developers' computers)
// dynamically choose the bit at runtime based on the current OS
// version.
// Apple platforms always use 2
# elif defined(__APPLE__)
# define SWIFT_CLASS_IS_SWIFT_MASK 2ULL

// Non-Apple platforms always use 1.
# else
# define SWIFT_CLASS_IS_SWIFT_MASK _swift_classIsSwiftMask
# define SWIFT_CLASS_IS_SWIFT_MASK_GLOBAL_VARIABLE 1
# define SWIFT_BUILD_HAS_BACK_DEPLOYMENT 1
# include "BackDeployment.h"
# define SWIFT_CLASS_IS_SWIFT_MASK 1ULL

# endif
#endif
Expand Down
11 changes: 2 additions & 9 deletions include/swift/SIL/SILFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -1020,19 +1020,12 @@ class SILFunction

/// Transfer all blocks of \p F into this function, at the begin of the block
/// list.
void moveAllBlocksFromOtherFunction(SILFunction *F) {
BlockList.splice(begin(), F->BlockList);
}
void moveAllBlocksFromOtherFunction(SILFunction *F);

/// Transfer \p blockInOtherFunction of another function into this function,
/// before \p insertPointInThisFunction.
void moveBlockFromOtherFunction(SILBasicBlock *blockInOtherFunction,
iterator insertPointInThisFunction) {
SILFunction *otherFunc = blockInOtherFunction->getParent();
assert(otherFunc != this);
BlockList.splice(insertPointInThisFunction, otherFunc->BlockList,
blockInOtherFunction);
}
iterator insertPointInThisFunction);

/// Move block \p BB to immediately before the iterator \p IP.
///
Expand Down
Loading