Skip to content

Commit 6f468c1

Browse files
authored
---
yaml --- r: 270334 b: refs/heads/tensorflow-merge c: ea8e2a2 h: refs/heads/master
1 parent c70661f commit 6f468c1

File tree

216 files changed

+3280
-1577
lines changed

Some content is hidden

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

216 files changed

+3280
-1577
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,4 +1128,4 @@ refs/tags/swift-4.2.1-RELEASE: 02a6ca969ea1387475b6caeb69c31186df7d30b6
11281128
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-11-01-a: 3b0299288f8287094b9ef587f46df54f42a347af
11291129
refs/heads/5.0-add-libcxx-and-clang-tools-extra: eb6e6f9b0a551e7804e96d0dac83add11ec73977
11301130
refs/heads/Fix-DataCreateSmall: e15aff31b7406a5b2dadac9d7810941cec85035a
1131-
refs/heads/tensorflow-merge: 4a7a44da8976519222b47be38cd583a6e5ceabcc
1131+
refs/heads/tensorflow-merge: ea8e2a20fca3652b648e8c94c62c9b2ca0267d31

branches/tensorflow-merge/CMakeLists.txt

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -898,14 +898,20 @@ if(SWIFT_NEED_EXPLICIT_LIBDISPATCH)
898898
if(CMAKE_C_COMPILER_ID STREQUAL Clang AND
899899
CMAKE_C_COMPILER_VERSION VERSION_GREATER 3.8
900900
OR LLVM_USE_SANITIZER)
901-
set(SWIFT_LIBDISPATCH_C_COMPILER ${CMAKE_C_COMPILER})
902-
set(SWIFT_LIBDISPATCH_CXX_COMPILER ${CMAKE_CXX_COMPILER})
903-
elseif(${CMAKE_SYSTEM_NAME} STREQUAL ${CMAKE_HOST_SYSTEM_NAME})
904-
set(SWIFT_LIBDISPATCH_C_COMPILER ${PATH_TO_CLANG_BUILD}/bin/clang)
905-
set(SWIFT_LIBDISPATCH_CXX_COMPILER ${PATH_TO_CLANG_BUILD}/bin/clang++)
906-
else()
907-
message(SEND_ERROR "libdispatch requires a newer clang compiler (${CMAKE_C_COMPILER_VERSION} < 3.9)")
908-
endif()
901+
set(SWIFT_LIBDISPATCH_C_COMPILER ${CMAKE_C_COMPILER})
902+
set(SWIFT_LIBDISPATCH_CXX_COMPILER ${CMAKE_CXX_COMPILER})
903+
elseif(${CMAKE_SYSTEM_NAME} STREQUAL ${CMAKE_HOST_SYSTEM_NAME})
904+
set(SWIFT_LIBDISPATCH_C_COMPILER ${PATH_TO_CLANG_BUILD}/bin/clang)
905+
set(SWIFT_LIBDISPATCH_CXX_COMPILER ${PATH_TO_CLANG_BUILD}/bin/clang++)
906+
else()
907+
message(SEND_ERROR "libdispatch requires a newer clang compiler (${CMAKE_C_COMPILER_VERSION} < 3.9)")
908+
endif()
909+
910+
if(SWIFT_HOST_VARIANT_SDK STREQUAL Windows)
911+
set(SOURCEKIT_LIBDISPATCH_RUNTIME_DIR bin)
912+
else()
913+
set(SOURCEKIT_LIBDISPATCH_RUNTIME_DIR lib)
914+
endif()
909915

910916
include(ExternalProject)
911917
ExternalProject_Add(libdispatch
@@ -923,6 +929,7 @@ if(SWIFT_NEED_EXPLICIT_LIBDISPATCH)
923929
-DCMAKE_LINKER=${CMAKE_LINKER}
924930
-DCMAKE_RANLIB=${CMAKE_RANLIB}
925931
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
932+
-DBUILD_SHARED_LIBS=YES
926933
-DENABLE_SWIFT=NO
927934
-DENABLE_TESTING=NO
928935
INSTALL_COMMAND
@@ -933,9 +940,9 @@ if(SWIFT_NEED_EXPLICIT_LIBDISPATCH)
933940
STEP_TARGETS
934941
install
935942
BUILD_BYPRODUCTS
936-
<INSTALL_DIR>/lib/${CMAKE_SHARED_LIBRARY_PREFIX}dispatch${CMAKE_SHARED_LIBRARY_SUFFIX}
943+
<INSTALL_DIR>/${SOURCEKIT_LIBDISPATCH_RUNTIME_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}dispatch${CMAKE_SHARED_LIBRARY_SUFFIX}
937944
<INSTALL_DIR>/lib/${CMAKE_IMPORT_LIBRARY_PREFIX}dispatch${CMAKE_IMPORT_LIBRARY_SUFFIX}
938-
<INSTALL_DIR>/lib/${CMAKE_SHARED_LIBRARY_PREFIX}BlocksRuntime${CMAKE_SHARED_LIBRARY_SUFFIX}
945+
<INSTALL_DIR>/${SOURCEKIT_LIBDISPATCH_RUNTIME_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}BlocksRuntime${CMAKE_SHARED_LIBRARY_SUFFIX}
939946
<INSTALL_DIR>/lib/${CMAKE_IMPORT_LIBRARY_PREFIX}BlocksRuntime${CMAKE_IMPORT_LIBRARY_SUFFIX}
940947
BUILD_ALWAYS
941948
1)
@@ -951,7 +958,7 @@ if(SWIFT_NEED_EXPLICIT_LIBDISPATCH)
951958
set_target_properties(dispatch
952959
PROPERTIES
953960
IMPORTED_LOCATION
954-
${install_dir}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}dispatch${CMAKE_SHARED_LIBRARY_SUFFIX}
961+
${install_dir}/${SOURCEKIT_LIBDISPATCH_RUNTIME_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}dispatch${CMAKE_SHARED_LIBRARY_SUFFIX}
955962
IMPORTED_IMPLIB
956963
${install_dir}/lib/${CMAKE_IMPORT_LIBRARY_PREFIX}dispatch${CMAKE_IMPORT_LIBRARY_SUFFIX}
957964
INTERFACE_INCLUDE_DIRECTORIES
@@ -961,7 +968,7 @@ if(SWIFT_NEED_EXPLICIT_LIBDISPATCH)
961968
set_target_properties(BlocksRuntime
962969
PROPERTIES
963970
IMPORTED_LOCATION
964-
${install_dir}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}BlocksRuntime${CMAKE_SHARED_LIBRARY_SUFFIX}
971+
${install_dir}/${SOURCEKIT_LIBDISPATCH_RUNTIME_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}BlocksRuntime${CMAKE_SHARED_LIBRARY_SUFFIX}
965972
IMPORTED_IMPLIB
966973
${install_dir}/lib/${CMAKE_IMPORT_LIBRARY_PREFIX}BlocksRuntime${CMAKE_IMPORT_LIBRARY_SUFFIX}
967974
INTERFACE_INCLUDE_DIRECTORIES

branches/tensorflow-merge/benchmark/scripts/Benchmark_Driver

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,15 @@ class BenchmarkDoctor(object):
330330
super(BenchmarkDoctor, self).__init__()
331331
self.driver = driver or BenchmarkDriver(args)
332332
self.results = {}
333-
self.console_handler = logging.StreamHandler(sys.stdout)
334-
self.console_handler.setLevel(logging.DEBUG if args.verbose else
335-
logging.INFO)
336-
self.console_handler.setFormatter(
337-
LoggingReportFormatter(use_color=sys.stdout.isatty()))
333+
334+
if hasattr(args, 'markdown') and args.markdown:
335+
self.console_handler = MarkdownReportHandler(sys.stdout)
336+
else:
337+
self.console_handler = logging.StreamHandler(sys.stdout)
338+
self.console_handler.setFormatter(
339+
LoggingReportFormatter(use_color=sys.stdout.isatty()))
340+
self.console_handler.setLevel(logging.DEBUG if args.verbose else
341+
logging.INFO)
338342
self.log.addHandler(self.console_handler)
339343
self.log.debug('Checking tests: %s', ', '.join(self.driver.tests))
340344
self.requirements = [
@@ -350,6 +354,7 @@ class BenchmarkDoctor(object):
350354
"""Close log handlers on exit."""
351355
for handler in list(self.log.handlers):
352356
handler.close()
357+
self.log.removeHandler(self.console_handler)
353358

354359
benchmark_naming_convention_re = re.compile(r'[A-Z][a-zA-Z0-9\-.!?]+')
355360
camel_humps_re = re.compile(r'[a-z][A-Z]')
@@ -703,9 +708,13 @@ def parse_args(args):
703708
'check',
704709
help='',
705710
parents=[shared_benchmarks_parser])
706-
check_parser.add_argument(
711+
check_group = check_parser.add_mutually_exclusive_group()
712+
check_group.add_argument(
707713
'-v', '--verbose', action='store_true',
708-
help='show more details during benchmark analysis',)
714+
help='show more details during benchmark analysis')
715+
check_group.add_argument(
716+
'-md', '--markdown', action='store_true',
717+
help='format report as Markdown table')
709718
check_parser.set_defaults(func=BenchmarkDoctor.run_check)
710719

711720
compare_parser = subparsers.add_parser(

branches/tensorflow-merge/benchmark/scripts/test_Benchmark_Driver.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,20 @@ def test_check_supports_vebose_output(self):
120120
self.assertTrue(parse_args(['check', '-v']).verbose)
121121
self.assertTrue(parse_args(['check', '--verbose']).verbose)
122122

123+
def test_check_supports_mardown_output(self):
124+
self.assertFalse(parse_args(['check']).markdown)
125+
self.assertTrue(parse_args(['check', '-md']).markdown)
126+
self.assertTrue(parse_args(['check', '--markdown']).markdown)
127+
128+
def test_check_flags_are_mutually_exclusive(self):
129+
with captured_output() as (out, err):
130+
self.assertRaises(SystemExit,
131+
parse_args, ['check', '-md', '-v'])
132+
self.assert_contains(
133+
['error:', 'argument -v/--verbose: ' +
134+
'not allowed with argument -md/--markdown'],
135+
err.getvalue())
136+
123137

124138
class ArgsStub(object):
125139
def __init__(self):
@@ -497,7 +511,7 @@ def setUpClass(cls):
497511

498512
def setUp(self):
499513
super(TestBenchmarkDoctor, self).setUp()
500-
self.args = Stub(verbose=False)
514+
self.args = Stub(verbose=False, markdown=False)
501515
self._doctor_log_handler.reset()
502516
self.logs = self._doctor_log_handler.messages
503517

@@ -516,8 +530,9 @@ def test_uses_logging(self):
516530
def test_supports_verbose_output(self):
517531
driver = BenchmarkDriverMock(tests=['B1', 'B2'])
518532
driver.verbose = True
533+
self.args.verbose = True
519534
with captured_output() as (out, _):
520-
BenchmarkDoctor(Stub(verbose=True), driver)
535+
BenchmarkDoctor(self.args, driver)
521536
self.assert_contains(['Checking tests: B1, B2'], out.getvalue())
522537

523538
def test_uses_report_formatter(self):
@@ -528,6 +543,14 @@ def test_uses_report_formatter(self):
528543
self.assertTrue(isinstance(console_handler.formatter,
529544
LoggingReportFormatter))
530545

546+
def test_uses_optional_markdown_report_formatter(self):
547+
self.args.markdown = True
548+
with captured_output() as (_, _):
549+
doc = BenchmarkDoctor(self.args, BenchmarkDriverMock(tests=['B1']))
550+
self.assertTrue(doc)
551+
console_handler = logging.getLogger('BenchmarkDoctor').handlers[1]
552+
self.assertTrue(isinstance(console_handler, MarkdownReportHandler))
553+
531554
def test_measure_10_independent_1s_benchmark_series(self):
532555
"""Measurement strategy takes 5 i2 and 5 i1 series.
533556

branches/tensorflow-merge/cmake/modules/AddSwift.cmake

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,10 +2015,19 @@ function(add_swift_target_library name)
20152015
WORLD_READ)
20162016
endif()
20172017

2018-
swift_install_in_component("${SWIFTLIB_INSTALL_IN_COMPONENT}"
2019-
FILES "${UNIVERSAL_LIBRARY_NAME}"
2020-
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}"
2018+
if(sdk STREQUAL WINDOWS AND CMAKE_SYSTEM_NAME STREQUAL Windows)
2019+
swift_install_in_component("${SWIFTLIB_INSTALL_IN_COMPONENT}"
2020+
TARGETS ${name}-windows-${SWIFT_PRIMARY_VARIANT_ARCH}
2021+
RUNTIME DESTINATION "bin"
2022+
LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}"
2023+
ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}"
20212024
PERMISSIONS ${file_permissions})
2025+
else()
2026+
swift_install_in_component("${SWIFTLIB_INSTALL_IN_COMPONENT}"
2027+
FILES "${UNIVERSAL_LIBRARY_NAME}"
2028+
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}"
2029+
PERMISSIONS ${file_permissions})
2030+
endif()
20222031
if(sdk STREQUAL WINDOWS)
20232032
foreach(arch ${SWIFT_SDK_WINDOWS_ARCHITECTURES})
20242033
if(TARGET ${name}-windows-${arch}_IMPLIB)

branches/tensorflow-merge/cmake/modules/SwiftSharedCMakeConfig.cmake

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ macro(swift_common_standalone_build_config_llvm product is_cross_compiling)
77
precondition_translate_flag(${product}_PATH_TO_LLVM_SOURCE PATH_TO_LLVM_SOURCE)
88
precondition_translate_flag(${product}_PATH_TO_LLVM_BUILD PATH_TO_LLVM_BUILD)
99

10+
file(TO_CMAKE_PATH "${PATH_TO_LLVM_BUILD}" PATH_TO_LLVM_BUILD)
11+
1012
set(SWIFT_LLVM_CMAKE_PATHS
1113
"${PATH_TO_LLVM_BUILD}/share/llvm/cmake"
1214
"${PATH_TO_LLVM_BUILD}/lib/cmake/llvm")
@@ -139,6 +141,9 @@ macro(swift_common_standalone_build_config_clang product is_cross_compiling)
139141
set(PATH_TO_CLANG_SOURCE "${${product}_PATH_TO_CLANG_SOURCE}")
140142
set(PATH_TO_CLANG_BUILD "${${product}_PATH_TO_CLANG_BUILD}")
141143

144+
file(TO_CMAKE_PATH "${PATH_TO_CLANG_SOURCE}" PATH_TO_CLANG_SOURCE)
145+
file(TO_CMAKE_PATH "${PATH_TO_CLANG_BUILD}" PATH_TO_CLANG_BUILD)
146+
142147
# Add all Clang CMake paths to our cmake module path.
143148
set(SWIFT_CLANG_CMAKE_PATHS
144149
"${PATH_TO_CLANG_BUILD}/share/clang/cmake"
@@ -188,12 +193,17 @@ macro(swift_common_standalone_build_config_cmark product)
188193
ABSOLUTE)
189194
get_filename_component(CMARK_LIBRARY_DIR "${${product}_CMARK_LIBRARY_DIR}"
190195
ABSOLUTE)
196+
191197
set(CMARK_MAIN_INCLUDE_DIR "${CMARK_MAIN_SRC_DIR}/src")
192198
set(CMARK_BUILD_INCLUDE_DIR "${PATH_TO_CMARK_BUILD}/src")
199+
200+
file(TO_CMAKE_PATH "${CMARK_MAIN_INCLUDE_DIR}" CMARK_MAIN_INCLUDE_DIR)
201+
file(TO_CMAKE_PATH "${CMARK_BUILD_INCLUDE_DIR}" CMARK_BUILD_INCLUDE_DIR)
202+
193203
include_directories("${CMARK_MAIN_INCLUDE_DIR}"
194204
"${CMARK_BUILD_INCLUDE_DIR}")
195205

196-
include(${${product}_PATH_TO_CMARK_BUILD}/src/CMarkExports.cmake)
206+
include(${PATH_TO_CMARK_BUILD}/src/CMarkExports.cmake)
197207
add_definitions(-DCMARK_STATIC_DEFINE)
198208
endmacro()
199209

branches/tensorflow-merge/docs/ABI/Mangling.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,9 @@ Property behaviors are implemented using private protocol conformances.
633633
::
634634

635635
concrete-protocol-conformance ::= type protocol-conformance-ref any-protocol-conformance-list 'HC'
636-
protocol-conformance-ref ::= protocol module? 'HP'
636+
protocol-conformance-ref ::= protocol 'HP' // same module as conforming type
637+
protocol-conformance-ref ::= protocol 'Hp' // same module as protocol
638+
protocol-conformance-ref ::= protocol module // "retroactive"
637639

638640
any-protocol-conformance ::= concrete-protocol-conformance
639641
any-protocol-conformance ::= dependent-protocol-conformance
@@ -651,10 +653,13 @@ Property behaviors are implemented using private protocol conformances.
651653
dependent-associated-conformance ::= type protocol
652654

653655
A compact representation used to represent mangled protocol conformance witness
654-
arguments at runtime. The ``module`` is only specified for conformances that are
655-
"retroactive", meaning that the context in which the conformance is defined is
656-
in neither the protocol or type module. The concrete protocol conformances that
657-
follow are for the conditional conformance requirements.
656+
arguments at runtime. The ``module`` is only specified for conformances that
657+
are "retroactive", meaning that the context in which the conformance is defined
658+
is in neither the protocol or type module. For a non-retroactive conformance
659+
where both the type *and* the protocol are in the same module, or for
660+
synthesized conformances that have no owning module, the "HP" operator is
661+
preferred. The concrete protocol conformances that follow are for the
662+
conditional conformance requirements.
658663

659664
Dependent protocol conformances mangle the access path required to extract a
660665
protocol conformance from some conformance passed into the environment. The

branches/tensorflow-merge/docs/ByteTree.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ For example, the string "Hello World" would be encoded as `(uint32_t)11` `"Hello
1313

1414
## Serialization of objects
1515

16-
An object consists of its size, measured in the number of fields and represented as a `uint_32t` in little endian order, followed by the direct concatenation of its fields. Because each field is again prefixed with its size, no delimites are necessary in between the fields.
16+
An object consists of its size, measured in the number of fields and represented as a `uint_32t` in little endian order, followed by the direct concatenation of its fields. Because each field is again prefixed with its size, no delimits are necessary in between the fields.
1717

18-
To distinguish scalars and objects, the size of objects has its most-siginificant bit set to 1. It must be ignored to retrieve the number of fields in the object.
18+
To distinguish scalars and objects, the size of objects has its most-significant bit set to 1. It must be ignored to retrieve the number of fields in the object.
1919

2020
Arrays are modelled as objects whose fields are all of the same type and whose length is variadic (and is indicated by the object's size).
2121

2222
## Versioning
2323

24-
The ByteTree format is prepended by a 4-byte protocol version number that describes the version of the object tree that was serialized. Its exact semantics are up to each specific application, but it is encouraged to interpret it as a two-comentent number where the first component, consisting of the three most significant bytes, is incremented for breaking changes and the last byte is incremented for backwards-compatible changes.
24+
The ByteTree format is prepended by a 4-byte protocol version number that describes the version of the object tree that was serialized. Its exact semantics are up to each specific application, but it is encouraged to interpret it as a two-component number where the first component, consisting of the three most significant bytes, is incremented for breaking changes and the last byte is incremented for backwards-compatible changes.
2525

26-
## Forward compatilibity
26+
## Forward compatibility
2727

2828
Fields may be added to the end of objects in a backwards compatible manner (older deserialisers will still be able to deserialise the format). It does so by skipping over all fields that are not read during deserialisation. Newer versions of the deserialiser can detect if recently added fields are not present in the serialised data by inspecting the `numFields` property passed during deserialisation.
2929

3030
## Serialization safety
3131

32-
Since all fields in objects are accessed by their index, issues quickly arise if a new field is accidentally added at the beginning of an object. To prevent issues like this, the ByteTree serialiser and deserialiser requires the explicit specification of each field's index within the object. These indicies are never serialised. Their sole purpose is to check that all fields are read in the correct order in assertion builds.
32+
Since all fields in objects are accessed by their index, issues quickly arise if a new field is accidentally added at the beginning of an object. To prevent issues like this, the ByteTree serialiser and deserialiser requires the explicit specification of each field's index within the object. These indices are never serialised. Their sole purpose is to check that all fields are read in the correct order in assertion builds.

branches/tensorflow-merge/docs/CompilerPerformance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ files in `<directory>`.
695695
696696
This option also provides _some_ high-level counters that are "always available"
697697
regardless of whether you're using an assert or release build, though assert
698-
builds still get _more_ counters (all of those available thorugh
698+
builds still get _more_ counters (all of those available through
699699
`-print-stats`). If you are using a new-enough compiler, `-stats-output-dir`
700700
often simplifies analysis, since its output is machine-readable and aggregates
701701
all the jobs in a multi-job compilation, and there's a post-processing script
@@ -1322,7 +1322,7 @@ internals of the compiler, just time and patience.
13221322
13231323
- Add Open Source projects to the
13241324
[source-compatibility testsuite](https://swift.org/source-compatibility/).
1325-
Apple's internal CI infastructure is now tracking selected non-assert-build
1325+
Apple's internal CI infrastructure is now tracking selected non-assert-build
13261326
`UnifiedStatsReporter` counters on those projects, and the team is far
13271327
more likely to catch a regression if it's shown by a project in the testsuite.
13281328

branches/tensorflow-merge/docs/Random.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ following implementation details:
1313
- Linux, FreeBSD, and other UNIX-like platforms use `getrandom(2)` when available;
1414
otherwise, they read from `/dev/urandom`.
1515
- Fuchsia platforms use `getentropy(3)`.
16-
- Windows paltforms use `BCryptGenRandom`.
16+
- Windows platforms use `BCryptGenRandom`.

branches/tensorflow-merge/docs/SIL.rst

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,7 @@ Linkage
984984
sil-linkage ::= 'private'
985985
sil-linkage ::= 'public_external'
986986
sil-linkage ::= 'hidden_external'
987+
sil-linkage ::= 'non_abi'
987988

988989
A linkage specifier controls the situations in which two objects in
989990
different SIL modules are *linked*, i.e. treated as the same object.
@@ -1048,6 +1049,25 @@ not needed.
10481049
If an object has any uses, then it must be linked to a definition
10491050
with non-external linkage.
10501051

1052+
Public non-ABI linkage
1053+
``````````````````````
1054+
1055+
The `non_abi` linkage is a special linkage used for definitions which
1056+
only exist in serialized SIL, and do not define visible symbols in the
1057+
object file.
1058+
1059+
A definition with `non_abi` linkage behaves like it has `shared` linkage,
1060+
except that it must be serialized in the SIL module even if not referenced
1061+
from anywhere else in the module. For example, this means it is considered
1062+
a root for dead function elimination.
1063+
1064+
When a `non_abi` definition is deserialized, it will have `shared_external`
1065+
linkage.
1066+
1067+
There is no `non_abi_external` linkage. Instead, when referencing a
1068+
`non_abi` declaration that is defined in a different translation unit from
1069+
the same Swift module, you must use `hidden_external` linkage.
1070+
10511071
Summary
10521072
```````
10531073

@@ -4750,7 +4770,7 @@ A ``convert_escape_to_noescape [not_guaranteed] %opd`` indicates that the
47504770
lifetime of its operand was not guaranteed by SILGen and a mandatory pass must
47514771
be run to ensure the lifetime of ``%opd``` for the conversion's uses.
47524772

4753-
A ``convert_escape_to_noescape [escaped]`` indiciates that the result was
4773+
A ``convert_escape_to_noescape [escaped]`` indicates that the result was
47544774
passed to a function (materializeForSet) which escapes the closure in a way not
47554775
expressed by the convert's users. The mandatory pass must ensure the lifetime
47564776
in a conservative way.

0 commit comments

Comments
 (0)