Skip to content

Commit 9827d7e

Browse files
authored
---
yaml --- r: 349379 b: refs/heads/master-next c: 24733aa h: refs/heads/master i: 349377: 2e4c0ae 349375: 077951a
1 parent 43b9441 commit 9827d7e

File tree

318 files changed

+4976
-1493
lines changed

Some content is hidden

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

318 files changed

+4976
-1493
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: 735eda042ad987f5de0118cbd87f80bd016b8dfc
3+
refs/heads/master-next: 24733aa4468f3ba2e16ac282989cdf0c1e0feb3e
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/CMakeLists.txt

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ if(MSVC OR "${CMAKE_SIMULATE_ID}" STREQUAL MSVC)
450450
endif()
451451

452452
if(CMAKE_SYSTEM_NAME STREQUAL Darwin OR
453-
EXISTS ${SWIFT_PATH_TO_LIBDISPATCH_SOURCE})
453+
EXISTS "${SWIFT_PATH_TO_LIBDISPATCH_SOURCE}")
454454
set(SWIFT_BUILD_SYNTAXPARSERLIB_default TRUE)
455455
set(SWIFT_BUILD_SOURCEKIT_default TRUE)
456456
else()
@@ -499,18 +499,6 @@ include(CMakePushCheckState)
499499

500500
print_versions()
501501

502-
include(SwiftSharedCMakeConfig)
503-
504-
# NOTE: We include this before SwiftComponents as it relies on some LLVM CMake
505-
# functionality.
506-
# Support building Swift as a standalone project, using LLVM as an
507-
# external library.
508-
if(SWIFT_BUILT_STANDALONE)
509-
swift_common_standalone_build_config(SWIFT)
510-
else()
511-
swift_common_unified_build_config(SWIFT)
512-
endif()
513-
514502
include(SwiftComponents)
515503
include(SwiftHandleGybSources)
516504
include(SwiftSetIfArchBitness)
@@ -539,6 +527,16 @@ if(NOT CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR STREQUAL "i386")
539527
OUTPUT_STRIP_TRAILING_WHITESPACE)
540528
endif()
541529

530+
include(SwiftSharedCMakeConfig)
531+
532+
# Support building Swift as a standalone project, using LLVM as an
533+
# external library.
534+
if(SWIFT_BUILT_STANDALONE)
535+
swift_common_standalone_build_config(SWIFT)
536+
else()
537+
swift_common_unified_build_config(SWIFT)
538+
endif()
539+
542540
get_filename_component(SWIFT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} REALPATH)
543541
set(SWIFT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
544542
set(SWIFT_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
@@ -1053,7 +1051,6 @@ if(SWIFT_NEED_EXPLICIT_LIBDISPATCH)
10531051
else()
10541052
set(SOURCEKIT_RUNTIME_DIR lib)
10551053
endif()
1056-
add_dependencies(sourcekit-inproc BlocksRuntime dispatch)
10571054
swift_install_in_component(FILES
10581055
$<TARGET_FILE:dispatch>
10591056
$<TARGET_FILE:BlocksRuntime>

branches/master-next/apinotes/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ add_custom_target("copy_apinotes" ALL
2626
COMMENT "Copying API notes to ${output_dir}"
2727
SOURCES "${sources}")
2828

29-
add_dependencies(compiler copy_apinotes)
3029
swift_install_in_component(DIRECTORY "${output_dir}"
3130
DESTINATION "lib/swift/"
3231
COMPONENT compiler)

branches/master-next/cmake/modules/AddSwift.cmake

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,6 @@ function(add_swift_host_library name)
15061506
INSTALL_IN_COMPONENT "dev"
15071507
)
15081508

1509-
add_dependencies(dev ${name})
15101509
if(NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
15111510
swift_install_in_component(TARGETS ${name}
15121511
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT dev
@@ -2118,7 +2117,6 @@ function(add_swift_target_library name)
21182117
endif()
21192118

21202119
if(sdk STREQUAL WINDOWS AND CMAKE_SYSTEM_NAME STREQUAL Windows)
2121-
add_dependencies(${SWIFTLIB_INSTALL_IN_COMPONENT} ${name}-windows-${SWIFT_PRIMARY_VARIANT_ARCH})
21222120
swift_install_in_component(TARGETS ${name}-windows-${SWIFT_PRIMARY_VARIANT_ARCH}
21232121
RUNTIME
21242122
DESTINATION "bin"
@@ -2131,9 +2129,6 @@ function(add_swift_target_library name)
21312129
COMPONENT "${SWIFTLIB_INSTALL_IN_COMPONENT}"
21322130
PERMISSIONS ${file_permissions})
21332131
else()
2134-
# NOTE: ${UNIVERSAL_LIBRARY_NAME} is the output associated with the target
2135-
# ${lipo_target}
2136-
add_dependencies(${SWIFTLIB_INSTALL_IN_COMPONENT} ${lipo_target})
21372132
swift_install_in_component(FILES "${UNIVERSAL_LIBRARY_NAME}"
21382133
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}"
21392134
COMPONENT "${SWIFTLIB_INSTALL_IN_COMPONENT}"
@@ -2144,7 +2139,6 @@ function(add_swift_target_library name)
21442139
foreach(arch ${SWIFT_SDK_WINDOWS_ARCHITECTURES})
21452140
if(TARGET ${name}-windows-${arch}_IMPLIB)
21462141
get_target_property(import_library ${name}-windows-${arch}_IMPLIB IMPORTED_LOCATION)
2147-
add_dependencies(${SWIFTLIB_INSTALL_IN_COMPONENT} ${name}-windows-${arch}_IMPLIB)
21482142
swift_install_in_component(FILES ${import_library}
21492143
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}/${arch}"
21502144
COMPONENT ${SWIFTLIB_INSTALL_IN_COMPONENT}
@@ -2211,7 +2205,6 @@ function(add_swift_target_library name)
22112205
OUTPUT
22122206
"${UNIVERSAL_LIBRARY_NAME}"
22132207
${THIN_INPUT_TARGETS_STATIC})
2214-
add_dependencies(${SWIFTLIB_INSTALL_IN_COMPONENT} ${lipo_target_static})
22152208
swift_install_in_component(FILES "${UNIVERSAL_LIBRARY_NAME}"
22162209
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${install_subdir}/${resource_dir_sdk_subdir}"
22172210
PERMISSIONS
@@ -2413,7 +2406,6 @@ function(add_swift_host_tool executable)
24132406
ARCHITECTURE ${SWIFT_HOST_VARIANT_ARCH}
24142407
${ASHT_UNPARSED_ARGUMENTS})
24152408

2416-
add_dependencies(${ASHT_SWIFT_COMPONENT} ${executable})
24172409
swift_install_in_component(TARGETS ${executable}
24182410
RUNTIME
24192411
DESTINATION bin

branches/master-next/cmake/modules/SwiftComponents.cmake

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -92,23 +92,11 @@ macro(swift_configure_components)
9292
"A semicolon-separated list of components to install from the set ${_SWIFT_DEFINED_COMPONENTS}")
9393

9494
foreach(component ${_SWIFT_DEFINED_COMPONENTS})
95-
add_custom_target(${component})
96-
add_llvm_install_targets(install-${component}
97-
DEPENDS ${component}
98-
COMPONENT ${component})
99-
10095
string(TOUPPER "${component}" var_name_piece)
10196
string(REPLACE "-" "_" var_name_piece "${var_name_piece}")
10297
set(SWIFT_INSTALL_${var_name_piece} FALSE)
10398
endforeach()
10499

105-
# NOTE: never_install is a dummy component to indicate something should not
106-
# be installed. We explicitly do not add an install target for this.
107-
add_custom_target(never_install)
108-
109-
add_custom_target(swift-components)
110-
add_custom_target(install-swift-components)
111-
112100
foreach(component ${SWIFT_INSTALL_COMPONENTS})
113101
if(NOT "${component}" IN_LIST _SWIFT_DEFINED_COMPONENTS)
114102
message(FATAL_ERROR "unknown install component: ${component}")
@@ -118,8 +106,6 @@ macro(swift_configure_components)
118106
string(REPLACE "-" "_" var_name_piece "${var_name_piece}")
119107
if(NOT SWIFT_INSTALL_EXCLUDE_${var_name_piece})
120108
set(SWIFT_INSTALL_${var_name_piece} TRUE)
121-
add_dependencies(swift-components ${component})
122-
add_dependencies(install-swift-components install-${component})
123109
endif()
124110
endforeach()
125111
endmacro()
@@ -188,6 +174,5 @@ function(swift_install_symlink_component component)
188174
MESSAGE "LLVMInstallSymlink script must be available.")
189175

190176
install(SCRIPT ${INSTALL_SYMLINK}
191-
CODE "install_symlink(${ARG_LINK_NAME} ${ARG_TARGET} ${ARG_DESTINATION})"
192-
COMPONENT ${component})
177+
CODE "install_symlink(${ARG_LINK_NAME} ${ARG_TARGET} ${ARG_DESTINATION})")
193178
endfunction()

branches/master-next/cmake/modules/SwiftManpage.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function(manpage)
2727
"${CMAKE_CURRENT_BINARY_DIR}/${MP_MAN_FILE_BASENAME}.${MP_MAN_SECTION}")
2828

2929
add_custom_command_target(
30-
manpage_target
30+
unused_var
3131
COMMAND
3232
"${POD2MAN}" "--section" "${MP_MAN_SECTION}"
3333
"--center" "${MP_PAGE_HEADER}" "--release=\"swift ${SWIFT_VERSION}\""
@@ -38,7 +38,6 @@ function(manpage)
3838
DEPENDS "${MP_SOURCE}"
3939
ALL)
4040

41-
add_dependencies(${MP_INSTALL_IN_COMPONENT} ${manpage_target})
4241
swift_install_in_component(FILES "${output_file_name}"
4342
DESTINATION "share/man/man${MP_MAN_SECTION}"
4443
COMPONENT "${MP_INSTALL_IN_COMPONENT}")

branches/master-next/docs/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ if (DOXYGEN_FOUND)
6868
add_dependencies(doxygen doxygen-swift)
6969
endif()
7070

71-
add_dependencies(dev doxygen-swift)
7271
swift_install_in_component(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doxygen/html"
7372
DESTINATION "docs/html"
7473
COMPONENT dev)

branches/master-next/docs/DebuggingTheCompiler.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ diagnostic engine to assert on the first error/warning:
8686
These allow one to dump a stack trace of where the diagnostic is being emitted
8787
(if run without a debugger) or drop into the debugger if a debugger is attached.
8888

89+
Finding Diagnostic Names
90+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91+
92+
Some diagnostics rely heavily on format string arguments, so it can be difficult
93+
to find their implementation by searching for parts of the emitted message in
94+
the codebase. To print the corresponding diagnostic name at the end of each
95+
emitted message, use the ``-Xfrontend -debug-diagnostic-names`` argument.
96+
8997
Debugging the Type Checker
9098
--------------------------
9199

branches/master-next/docs/SIL.rst

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,8 +2342,8 @@ assign_by_wrapper
23422342
assign_by_wrapper %0 : $S to %1 : $*T, init %2 : $F, set %3 : $G
23432343
// $S can be a value or address type
23442344
// $T must be the type of a property wrapper.
2345-
// $F must be a function type, taking $S as a single argument and returning $T
2346-
// $G must be a function type, taking $S as a single argument and with not return value
2345+
// $F must be a function type, taking $S as a single argument (or multiple arguments in case of a tuple) and returning $T
2346+
// $G must be a function type, taking $S as a single argument (or multiple arguments in case of a tuple) and without a return value
23472347

23482348
Similar to the ``assign`` instruction, but the assignment is done via a
23492349
delegate.
@@ -3484,13 +3484,14 @@ has an escaping function type (not ``[on_stack]``) the closure context will be
34843484
allocated with retain count 1 and initialized to contain the values ``%1``,
34853485
``%2``, etc. The closed-over values will not be retained; that must be done
34863486
separately before the ``partial_apply``. The closure does however take ownership
3487-
of the partially applied arguments; when the closure reference count reaches
3488-
zero, the contained values will be destroyed. If the ``partial_apply`` has a
3489-
``@noescape`` function type (``partial_apply [on_stack]``) the closure context
3490-
is allocated on the stack and initialized to contain the closed-over values. The
3491-
closed-over values are not retained, lifetime of the closed-over values must be
3492-
managed separately. The lifetime of the stack context of a ``partial_apply
3493-
[on_stack]`` must be terminated with a ``dealloc_stack``.
3487+
of the partially applied arguments (except for ``@inout_aliasable`` parameters);
3488+
when the closure reference count reaches zero, the contained values will be
3489+
destroyed. If the ``partial_apply`` has a ``@noescape`` function type
3490+
(``partial_apply [on_stack]``) the closure context is allocated on the stack and
3491+
initialized to contain the closed-over values. The closed-over values are not
3492+
retained, lifetime of the closed-over values must be managed separately. The
3493+
lifetime of the stack context of a ``partial_apply [on_stack]`` must be
3494+
terminated with a ``dealloc_stack``.
34943495

34953496
If the callee is generic, all of its generic parameters must be bound by the
34963497
given substitution list. The arguments are given with these generic
@@ -3499,6 +3500,11 @@ type with the given substitutions applied. The generic parameters themselves
34993500
cannot be partially applied; all of them must be bound. The result is always
35003501
a concrete function.
35013502

3503+
If an address argument has ``@inout_aliasable`` convention, the closure
3504+
obtained from ``partial_apply`` will not own its underlying value.
3505+
The ``@inout_aliasable`` parameter convention is used when a ``@noescape``
3506+
closure captures an ``inout`` argument.
3507+
35023508
TODO: The instruction, when applied to a generic function,
35033509
currently implicitly performs abstraction difference transformations enabled
35043510
by the given substitutions, such as promoting address-only arguments and returns

branches/master-next/include/swift/AST/ASTContext.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -829,10 +829,6 @@ class ASTContext final {
829829
/// \param IDC The context whose member decls should be lazily parsed.
830830
void parseMembers(IterableDeclContext *IDC);
831831

832-
/// Use the lazy parsers associated with the context to check whether the decl
833-
/// context has been parsed.
834-
bool hasUnparsedMembers(const IterableDeclContext *IDC) const;
835-
836832
/// Get the lazy function data for the given generic context.
837833
///
838834
/// \param lazyLoader If non-null, the lazy loader to use when creating the

branches/master-next/include/swift/AST/Attr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ class TypeAttributes {
101101
AttrLocs[A] = L;
102102
}
103103

104-
void getAttrRanges(SmallVectorImpl<SourceRange> &Ranges) const {
104+
void getAttrLocs(SmallVectorImpl<SourceLoc> &Locs) const {
105105
for (auto Loc : AttrLocs) {
106106
if (Loc.isValid())
107-
Ranges.push_back(Loc);
107+
Locs.push_back(Loc);
108108
}
109109
}
110110

branches/master-next/include/swift/AST/ClangModuleLoader.h

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#define SWIFT_AST_CLANG_MODULE_LOADER_H
1515

1616
#include "swift/AST/ModuleLoader.h"
17-
#include "swift/Demangling/Demangle.h"
1817

1918
namespace clang {
2019
class ASTContext;
@@ -28,11 +27,24 @@ namespace swift {
2827
class DeclContext;
2928
class VisibleDeclConsumer;
3029

30+
/// Represents the different namespaces for types in C.
31+
///
32+
/// A simplified version of clang::Sema::LookupKind.
33+
enum class ClangTypeKind {
34+
Typedef,
35+
ObjCClass = Typedef,
36+
/// Structs, enums, and unions.
37+
Tag,
38+
ObjCProtocol,
39+
};
40+
3141
class ClangModuleLoader : public ModuleLoader {
3242
private:
3343
virtual void anchor();
44+
3445
protected:
3546
using ModuleLoader::ModuleLoader;
47+
3648
public:
3749
virtual clang::ASTContext &getClangASTContext() const = 0;
3850
virtual clang::Preprocessor &getClangPreprocessor() const = 0;
@@ -56,9 +68,9 @@ class ClangModuleLoader : public ModuleLoader {
5668
///
5769
/// This routine is used for various hacks that are only permitted within
5870
/// overlays of imported modules, e.g., Objective-C bridging conformances.
59-
virtual bool isInOverlayModuleForImportedModule(
60-
const DeclContext *overlayDC,
61-
const DeclContext *importedDC) = 0;
71+
virtual bool
72+
isInOverlayModuleForImportedModule(const DeclContext *overlayDC,
73+
const DeclContext *importedDC) = 0;
6274

6375
/// Look for declarations associated with the given name.
6476
///
@@ -70,7 +82,7 @@ class ClangModuleLoader : public ModuleLoader {
7082
/// Note that this method does no filtering. If it finds the type in a loaded
7183
/// module, it returns it. This is intended for use in reflection / debugging
7284
/// contexts where access is not a problem.
73-
virtual void lookupTypeDecl(StringRef clangName, Demangle::Node::Kind kind,
85+
virtual void lookupTypeDecl(StringRef clangName, ClangTypeKind kind,
7486
llvm::function_ref<void(TypeDecl *)> receiver) {}
7587

7688
/// Look up type a declaration synthesized by the Clang importer itself, using
@@ -82,11 +94,11 @@ class ClangModuleLoader : public ModuleLoader {
8294
/// module, it returns it. This is intended for use in reflection / debugging
8395
/// contexts where access is not a problem.
8496
virtual void
85-
lookupRelatedEntity(StringRef clangName, StringRef relatedEntityKind,
97+
lookupRelatedEntity(StringRef clangName, ClangTypeKind kind,
98+
StringRef relatedEntityKind,
8699
llvm::function_ref<void(TypeDecl *)> receiver) {}
87100
};
88101

89102
} // namespace swift
90103

91104
#endif // LLVM_SWIFT_AST_CLANG_MODULE_LOADER_H
92-

0 commit comments

Comments
 (0)