Skip to content

Commit 7570ea4

Browse files
committed
---
yaml --- r: 293823 b: refs/heads/tensorflow c: 0ad0a84 h: refs/heads/master i: 293821: edde953 293819: 78519f6 293815: 03ad18c 293807: 9870332 293791: 1e7064e 293759: d1893ee
1 parent e074f30 commit 7570ea4

Some content is hidden

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

48 files changed

+248
-401
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-04-25-a: 22f738a831d43aff2b9c9773bcb65
816816
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-05-08-a: 7d98cc16689baba5c8a3b90a9329bdcc1a12b4e9
817817
refs/heads/cherr42: a566ad54b073c2c56ac0a705d0a5bed9743135a5
818818
"refs/heads/codable_test_comment_fix": fc8f6824f7f347e1e8db55bff62db385c5728b5a
819-
refs/heads/tensorflow: 24139eae61624a3b79f78efca42e2c3ca0927a51
819+
refs/heads/tensorflow: 0ad0a844f322130be79c64a9d062d835ca4904b9
820820
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-11-a: 8126fd7a652e2f70ad6d76505239e34fb2ef3e1a
821821
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-12-a: b3fd3dd84df6717f2e2e9df58c6d7e99fed57086
822822
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-13-a: 71135119579039dc321c5f65d870050fe36efda2

branches/tensorflow/CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -998,17 +998,17 @@ if(SWIFT_NEED_EXPLICIT_LIBDISPATCH)
998998
else()
999999
set(SOURCEKIT_RUNTIME_DIR lib)
10001000
endif()
1001-
swift_install_in_component(FILES
1001+
swift_install_in_component(sourcekit-inproc
1002+
FILES
10021003
$<TARGET_FILE:dispatch>
10031004
$<TARGET_FILE:BlocksRuntime>
1004-
DESTINATION ${SOURCEKIT_RUNTIME_DIR}
1005-
COMPONENT sourcekit-inproc)
1005+
DESTINATION ${SOURCEKIT_RUNTIME_DIR})
10061006
if(SWIFT_HOST_VARIANT_SDK STREQUAL WINDOWS)
1007-
swift_install_in_component(FILES
1007+
swift_install_in_component(sourcekit-inproc
1008+
FILES
10081009
$<TARGET_LINKER_FILE:dispatch>
10091010
$<TARGET_LINKER_FILE:BlocksRuntime>
1010-
DESTINATION lib
1011-
COMPONENT sourcekit-inproc)
1011+
DESTINATION lib)
10121012
endif()
10131013

10141014

@@ -1083,9 +1083,9 @@ endif()
10831083

10841084
add_subdirectory(cmake/modules)
10851085

1086-
swift_install_in_component(FILES "LICENSE.txt"
1087-
DESTINATION "share/swift"
1088-
COMPONENT license)
1086+
swift_install_in_component(license
1087+
FILES "LICENSE.txt"
1088+
DESTINATION "share/swift")
10891089

10901090
# Add a documentation target so that documentation shows up in the
10911091
# Xcode project.

branches/tensorflow/apinotes/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ add_custom_target("copy_apinotes"
3131
# This is treated as an OPTIONAL target because if we don't build the SDK
3232
# overlay, the files will be missing anyway. It also allows us to build
3333
# single overlays without installing the API notes.
34-
swift_install_in_component(DIRECTORY "${output_dir}"
35-
DESTINATION "lib/swift/"
36-
COMPONENT sdk-overlay
37-
OPTIONAL)
34+
swift_install_in_component(sdk-overlay
35+
DIRECTORY "${output_dir}"
36+
DESTINATION "lib/swift/"
37+
OPTIONAL)

branches/tensorflow/cmake/modules/AddSwift.cmake

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,11 +1452,11 @@ function(add_swift_host_library name)
14521452
)
14531453

14541454
if(NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
1455-
swift_install_in_component(TARGETS ${name}
1456-
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
1457-
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
1458-
RUNTIME DESTINATION bin
1459-
COMPONENT dev)
1455+
swift_install_in_component(dev
1456+
TARGETS ${name}
1457+
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
1458+
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
1459+
RUNTIME DESTINATION bin)
14601460
endif()
14611461

14621462
swift_is_installing_component(dev is_installing)
@@ -2018,27 +2018,27 @@ function(add_swift_target_library name)
20182018
endif()
20192019

20202020
if(sdk STREQUAL WINDOWS AND CMAKE_SYSTEM_NAME STREQUAL Windows)
2021-
swift_install_in_component(TARGETS ${name}-windows-${SWIFT_PRIMARY_VARIANT_ARCH}
2022-
RUNTIME DESTINATION "bin"
2023-
LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}/${SWIFT_PRIMARY_VARIANT_ARCH}"
2024-
ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}/${SWIFT_PRIMARY_VARIANT_ARCH}"
2025-
COMPONENT "${SWIFTLIB_INSTALL_IN_COMPONENT}"
2026-
PERMISSIONS ${file_permissions})
2021+
swift_install_in_component("${SWIFTLIB_INSTALL_IN_COMPONENT}"
2022+
TARGETS ${name}-windows-${SWIFT_PRIMARY_VARIANT_ARCH}
2023+
RUNTIME DESTINATION "bin"
2024+
LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}/${SWIFT_PRIMARY_VARIANT_ARCH}"
2025+
ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}/${SWIFT_PRIMARY_VARIANT_ARCH}"
2026+
PERMISSIONS ${file_permissions})
20272027
else()
2028-
swift_install_in_component(FILES "${UNIVERSAL_LIBRARY_NAME}"
2029-
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}"
2030-
COMPONENT "${SWIFTLIB_INSTALL_IN_COMPONENT}"
2031-
PERMISSIONS ${file_permissions}
2032-
"${optional_arg}")
2028+
swift_install_in_component("${SWIFTLIB_INSTALL_IN_COMPONENT}"
2029+
FILES "${UNIVERSAL_LIBRARY_NAME}"
2030+
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}"
2031+
PERMISSIONS ${file_permissions}
2032+
"${optional_arg}")
20332033
endif()
20342034
if(sdk STREQUAL WINDOWS)
20352035
foreach(arch ${SWIFT_SDK_WINDOWS_ARCHITECTURES})
20362036
if(TARGET ${name}-windows-${arch}_IMPLIB)
20372037
get_target_property(import_library ${name}-windows-${arch}_IMPLIB IMPORTED_LOCATION)
2038-
swift_install_in_component(FILES ${import_library}
2039-
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}/${arch}"
2040-
COMPONENT ${SWIFTLIB_INSTALL_IN_COMPONENT}
2041-
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
2038+
swift_install_in_component(${SWIFTLIB_INSTALL_IN_COMPONENT}
2039+
FILES ${import_library}
2040+
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}/${arch}"
2041+
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
20422042
endif()
20432043
endforeach()
20442044
endif()
@@ -2070,14 +2070,14 @@ function(add_swift_target_library name)
20702070
OUTPUT
20712071
"${UNIVERSAL_LIBRARY_NAME}"
20722072
${THIN_INPUT_TARGETS_STATIC})
2073-
swift_install_in_component(FILES "${UNIVERSAL_LIBRARY_NAME}"
2074-
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift_static/${resource_dir_sdk_subdir}"
2075-
PERMISSIONS
2076-
OWNER_READ OWNER_WRITE
2077-
GROUP_READ
2078-
WORLD_READ
2079-
COMPONENT "${SWIFTLIB_INSTALL_IN_COMPONENT}"
2080-
"${optional_arg}")
2073+
swift_install_in_component("${SWIFTLIB_INSTALL_IN_COMPONENT}"
2074+
FILES "${UNIVERSAL_LIBRARY_NAME}"
2075+
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift_static/${resource_dir_sdk_subdir}"
2076+
PERMISSIONS
2077+
OWNER_READ OWNER_WRITE
2078+
GROUP_READ
2079+
WORLD_READ
2080+
"${optional_arg}")
20812081
endif()
20822082

20832083
# Add Swift standard library targets as dependencies to the top-level
@@ -2260,9 +2260,9 @@ function(add_swift_host_tool executable)
22602260
ARCHITECTURE ${SWIFT_HOST_VARIANT_ARCH}
22612261
${ASHT_UNPARSED_ARGUMENTS})
22622262

2263-
swift_install_in_component(TARGETS ${executable}
2264-
RUNTIME DESTINATION bin
2265-
COMPONENT ${ASHT_SWIFT_COMPONENT})
2263+
swift_install_in_component(${ASHT_SWIFT_COMPONENT}
2264+
TARGETS ${executable}
2265+
RUNTIME DESTINATION bin)
22662266

22672267
swift_is_installing_component(${ASHT_SWIFT_COMPONENT} is_installing)
22682268

branches/tensorflow/cmake/modules/SwiftComponents.cmake

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,30 +127,42 @@ function(swift_is_installing_component component result_var_name)
127127
endif()
128128
endfunction()
129129

130-
# swift_install_in_component(<same parameters as install()>)
130+
# swift_install_in_component(<COMPONENT NAME>
131+
# <same parameters as install()>)
131132
#
132133
# Executes the specified installation actions if the named component is
133134
# requested to be installed.
134135
#
135136
# This function accepts the same parameters as install().
136-
function(swift_install_in_component)
137-
cmake_parse_arguments(
138-
ARG # prefix
139-
"" # options
140-
"COMPONENT" # single-value args
141-
"" # multi-value args
142-
${ARGN})
143-
144-
precondition(ARG_COMPONENT MESSAGE "Component name is required")
137+
function(swift_install_in_component component)
138+
precondition(component MESSAGE "Component name is required")
145139

146-
swift_is_installing_component("${ARG_COMPONENT}" is_installing)
140+
swift_is_installing_component("${component}" is_installing)
147141
if(NOT is_installing)
148142
return()
149143
endif()
150144

151145
install(${ARGN})
152146
endfunction()
153147

148+
# swift_install_in_either_component(<COMPONENT1 NAME> <COMPONENT2 NAME>
149+
# <same parameters as install()>)
150+
#
151+
# Executes the specified installation actions if either one of the named
152+
# components is requested to be installed.
153+
#
154+
# This function accepts the same parameters as install().
155+
function(swift_install_in_either_component comp1 comp2)
156+
foreach(component ${comp1} ${comp2})
157+
precondition(component MESSAGE "Component name is required")
158+
swift_is_installing_component("${component}" is_installing)
159+
if(is_installing)
160+
install(${ARGN})
161+
return()
162+
endif()
163+
endforeach(component)
164+
endfunction()
165+
154166
function(swift_install_symlink_component component)
155167
cmake_parse_arguments(
156168
ARG # prefix

branches/tensorflow/cmake/modules/SwiftManpage.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ function(manpage)
3838
DEPENDS "${MP_SOURCE}"
3939
ALL)
4040

41-
swift_install_in_component(FILES "${output_file_name}"
42-
DESTINATION "share/man/man${MP_MAN_SECTION}"
43-
COMPONENT "${MP_INSTALL_IN_COMPONENT}")
41+
swift_install_in_component("${MP_INSTALL_IN_COMPONENT}"
42+
FILES "${output_file_name}"
43+
DESTINATION "share/man/man${MP_MAN_SECTION}")
4444
endfunction()
4545

branches/tensorflow/cmake/modules/SwiftSource.cmake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -340,14 +340,14 @@ function(_compile_swift_files
340340
endif()
341341

342342
if(SWIFTFILE_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
343-
swift_install_in_component(DIRECTORY "${specific_module_dir}"
344-
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${library_subdir}"
345-
COMPONENT "${SWIFTFILE_INSTALL_IN_COMPONENT}"
346-
OPTIONAL)
343+
swift_install_in_component("${SWIFTFILE_INSTALL_IN_COMPONENT}"
344+
DIRECTORY "${specific_module_dir}"
345+
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${library_subdir}"
346+
OPTIONAL)
347347
else()
348-
swift_install_in_component(FILES ${module_outputs}
349-
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${library_subdir}"
350-
COMPONENT "${SWIFTFILE_INSTALL_IN_COMPONENT}")
348+
swift_install_in_component("${SWIFTFILE_INSTALL_IN_COMPONENT}"
349+
FILES ${module_outputs}
350+
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${library_subdir}")
351351
endif()
352352

353353
set(line_directive_tool "${SWIFT_SOURCE_DIR}/utils/line-directive")

branches/tensorflow/docs/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ if (DOXYGEN_FOUND)
6868
add_dependencies(doxygen doxygen-swift)
6969
endif()
7070

71-
swift_install_in_component(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doxygen/html"
72-
DESTINATION "docs/html"
73-
COMPONENT dev)
71+
swift_install_in_component(dev
72+
DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doxygen/html"
73+
DESTINATION "docs/html")
7474
endif()
7575
endif()

branches/tensorflow/include/swift/AST/ASTTypeIDZone.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ SWIFT_TYPEID(Type)
2020
SWIFT_TYPEID(PropertyDelegateBackingPropertyInfo)
2121
SWIFT_TYPEID(PropertyDelegateTypeInfo)
2222
SWIFT_TYPEID_NAMED(CustomAttr *, CustomAttr)
23-
SWIFT_TYPEID_NAMED(TypeAliasDecl *, TypeAliasDecl)

branches/tensorflow/include/swift/AST/ASTTypeIDs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ struct PropertyDelegateBackingPropertyInfo;
2626
struct PropertyDelegateTypeInfo;
2727
class Type;
2828
class VarDecl;
29-
class TypeAliasDecl;
3029

3130
#define SWIFT_AST_TYPEID_ZONE 1
3231

branches/tensorflow/include/swift/AST/Decl.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2896,8 +2896,6 @@ class TypeAliasDecl : public GenericTypeDecl {
28962896
/// For generic typealiases, return the unbound generic type.
28972897
UnboundGenericType *getUnboundGenericType() const;
28982898

2899-
Type getStructuralType() const;
2900-
29012899
bool isCompatibilityAlias() const {
29022900
return Bits.TypeAliasDecl.IsCompatibilityAlias;
29032901
}

branches/tensorflow/include/swift/AST/DiagnosticsSema.def

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,9 +1030,6 @@ ERROR(extra_argument_to_nullary_call,none,
10301030
"argument passed to call that takes no arguments", ())
10311031
ERROR(extra_trailing_closure_in_call,none,
10321032
"extra trailing closure passed in call", ())
1033-
ERROR(trailing_closure_bad_param,none,
1034-
"trailing closure passed to parameter of type %0 that does not "
1035-
"accept a closure", (Type))
10361033
ERROR(no_accessible_initializers,none,
10371034
"%0 cannot be constructed because it has no accessible initializers",
10381035
(Type))

branches/tensorflow/include/swift/AST/TypeCheckRequests.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class GenericParamList;
3333
struct PropertyDelegateBackingPropertyInfo;
3434
class RequirementRepr;
3535
class SpecializeAttr;
36-
class TypeAliasDecl;
3736
struct TypeLoc;
3837

3938
/// Display a nominal type or extension thereof.
@@ -548,30 +547,6 @@ class PropertyDelegateBackingPropertyInfoRequest :
548547
void noteCycleStep(DiagnosticEngine &diags) const;
549548
};
550549

551-
/// Retrieve the structural type of an alias type.
552-
class StructuralTypeRequest :
553-
public SimpleRequest<StructuralTypeRequest,
554-
CacheKind::Cached,
555-
Type,
556-
TypeAliasDecl*> {
557-
public:
558-
using SimpleRequest::SimpleRequest;
559-
560-
private:
561-
friend SimpleRequest;
562-
563-
// Evaluation.
564-
llvm::Expected<Type> evaluate(Evaluator &eval, TypeAliasDecl *d) const;
565-
566-
public:
567-
// Cycle handling.
568-
void diagnoseCycle(DiagnosticEngine &diags) const;
569-
void noteCycleStep(DiagnosticEngine &diags) const;
570-
571-
// Caching.
572-
bool isCached() const { return true; }
573-
};
574-
575550
// Allow AnyValue to compare two Type values, even though Type doesn't
576551
// support ==.
577552
template<>

branches/tensorflow/include/swift/AST/TypeCheckerTypeIDZone.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ SWIFT_TYPEID(IsFinalRequest)
2323
SWIFT_TYPEID(IsDynamicRequest)
2424
SWIFT_TYPEID(RequirementRequest)
2525
SWIFT_TYPEID(USRGenerationRequest)
26-
SWIFT_TYPEID(StructuralTypeRequest)
2726
SWIFT_TYPEID(DefaultTypeRequest)
2827
SWIFT_TYPEID(MangleLocalTypeDeclRequest)
2928
SWIFT_TYPEID(PropertyDelegateTypeInfoRequest)

branches/tensorflow/include/swift/SwiftRemoteMirror/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ list(APPEND swift_remote_mirror_headers
44
Platform.h
55
SwiftRemoteMirror.h
66
SwiftRemoteMirrorTypes.h)
7-
swift_install_in_component(FILES
7+
swift_install_in_component("swift-remote-mirror-headers"
8+
FILES
89
${swift_remote_mirror_headers}
910
DESTINATION
10-
"include/swift/SwiftRemoteMirror"
11-
COMPONENT
12-
swift-remote-mirror-headers)
11+
"include/swift/SwiftRemoteMirror")
1312

branches/tensorflow/lib/AST/Decl.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3451,15 +3451,6 @@ UnboundGenericType *TypeAliasDecl::getUnboundGenericType() const {
34513451
parentTy, getASTContext());
34523452
}
34533453

3454-
Type TypeAliasDecl::getStructuralType() const {
3455-
assert(!getGenericParams());
3456-
3457-
auto &context = getASTContext();
3458-
return evaluateOrDefault(context.evaluator,
3459-
StructuralTypeRequest { const_cast<TypeAliasDecl *>(this) },
3460-
Type());
3461-
}
3462-
34633454
Type AbstractTypeParamDecl::getSuperclass() const {
34643455
auto *genericEnv = getDeclContext()->getGenericEnvironmentOfContext();
34653456
assert(genericEnv != nullptr && "Too much circularity");

0 commit comments

Comments
 (0)