Skip to content
Permalink
Browse files
[gardening] Fix accidental trailing whitespace.
  • Loading branch information
practicalswift committed Oct 29, 2016
1 parent 3616567 commit cc852042c9da5892fb5cdedfb6cf49740004755c
Showing 165 changed files with 1,002 additions and 1,002 deletions.
@@ -506,20 +506,20 @@ if(XCODE)
endif()

This comment has been minimized.

Copy link
@jamiecosner

jamiecosner Jul 24, 2019

Giveif( loyal and true)


# FIXME: the parameters we specify in SWIFT_SDKS are lacking architecture specifics,
# so we need to hard-code it. For example, the SDK for Android is just 'ANDROID',
# which we assume below to be armv7.
# so we need to hard-code it. For example, the SDK for Android is just 'ANDROID',
# which we assume below to be armv7.
# The iOS SDKs all have their architectures hardcoded because they are just specified by name (e.g. 'IOS' or 'WATCHOS').
# We can't cross-compile the standard library for another linux architecture,
# because the SDK list would just be 'LINUX' and we couldn't disambiguate it from the host.
#
#
# To fix it, we would need to append the architecture to the SDKs,
# for example: 'OSX-x86_64;IOS-armv7;...etc'.
# We could easily do that - we have all of that information in build-script-impl.
# Also, we would need to be provided with the sysroot for each SDK (see SWIFT_ANDROID_SDK_PATH/SWIFT_SDK_ANDROID_PATH).
# Darwin targets cheat and use `xcrun`.

if("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "LINUX")

This comment has been minimized.

Copy link
@jamiecosner

jamiecosner Jul 24, 2019

Equal


set(CMAKE_EXECUTABLE_FORMAT "ELF")
set(SWIFT_HOST_VARIANT "linux" CACHE STRING
"Deployment OS for Swift host tools (the compiler) [linux].")
@@ -550,7 +550,7 @@ if("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "LINUX")
endif()

elseif("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "FREEBSD")

set(CMAKE_EXECUTABLE_FORMAT "ELF")
set(SWIFT_HOST_VARIANT "freebsd" CACHE STRING
"Deployment OS for Swift host tools (the compiler) [freebsd].")
@@ -563,13 +563,13 @@ elseif("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "FREEBSD")
"x86_64-unknown-freebsd${FREEBSD_SYSTEM_VERSION}" "/")
set(SWIFT_PRIMARY_VARIANT_SDK_default "${SWIFT_HOST_VARIANT_SDK}")
set(SWIFT_PRIMARY_VARIANT_ARCH_default "x86_64")

elseif("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "CYGWIN")

# set(CMAKE_EXECUTABLE_FORMAT "ELF")
set(SWIFT_HOST_VARIANT "windows" CACHE STRING
"Deployment OS for Swift host tools (the compiler) [windows].")

configure_sdk_unix(CYGWIN "Cygwin" "windows" "cygwin" "windows" "x86_64-unknown-windows-cygnus" "/")
set(SWIFT_PRIMARY_VARIANT_SDK_default "${SWIFT_HOST_VARIANT_SDK}")
set(SWIFT_PRIMARY_VARIANT_ARCH_default "x86_64")
@@ -579,7 +579,7 @@ elseif("${SWIFT_HOST_VARIANT_SDK}" MATCHES "(OSX|IOS*|TVOS*|WATCHOS*)")
set(SWIFT_HOST_VARIANT "macosx" CACHE STRING
"Deployment OS for Swift host tools (the compiler) [macosx, iphoneos].")

# Display Xcode toolchain version.
# Display Xcode toolchain version.
# The SDK configuration below prints each SDK version.
execute_process(
COMMAND "xcodebuild" "-version"
@@ -200,8 +200,8 @@
See the License for the specific language governing permissions and
limitations under the License.



## Runtime Library Exception to the Apache 2.0 License: ##


@@ -90,7 +90,7 @@ Functions:
# replaced by Equatable / ==
SwiftName: CGAffineTransform.__equalTo(self:_:)

This comment has been minimized.

Copy link
@jamiecosner

jamiecosner Jul 24, 2019

(self:Jamie Willis

SwiftPrivate: true

# CGBitmapContext
- Name: CGBitmapContextCreateWithData
SwiftName: CGContext.init(data:width:height:bitsPerComponent:bytesPerRow:space:bitmapInfo:releaseCallback:releaseInfo:)
@@ -114,7 +114,7 @@ Functions:
SwiftName: getter:CGContext.alphaInfo(self:)
- Name: CGBitmapContextCreateImage
SwiftName: CGContext.makeImage(self:)

# CGColor
#
- Name: CGColorCreate
@@ -409,7 +409,7 @@ Functions:
- Name: CGGetLastMouseDelta
# replaced by a version that returns CGVector instead of using out-pointers
SwiftPrivate: true

# CGEvent
- Name: CGEventCreateFromData
SwiftName: CGEvent.init(withDataAllocator:data:)
@@ -421,7 +421,7 @@ Functions:
SwiftName: CGEvent.postToPid(_:self:)
- Name: CGEventCreateSourceFromEvent
SwiftName: CGEventSource.init(event:)

# CGFont
- Name: CGFontCreateWithDataProvider
SwiftName: CGFont.init(_:)
@@ -443,7 +443,7 @@ Functions:
SwiftName: CGFont.table(self:for:)
- Name: CGFontCreateCopyWithVariations
SwiftName: CGFont.copy(self:withVariations:)

# CGGeometry
- Name: CGPointCreateDictionaryRepresentation
SwiftName: getter:CGPoint.dictionaryRepresentation(self:)
@@ -474,7 +474,7 @@ Functions:
# hide in favor of an init (can't map to initializer because out-pointer)
SwiftName: CGRect.__setFromDictionaryRepresentation(_:_:)
SwiftPrivate: true

# CGGradient
- Name: CGGradientCreateWithColorComponents
SwiftName: CGGradient.init(colorSpace:colorComponents:locations:count:)
@@ -557,7 +557,7 @@ Functions:
# CGPSConverter
- Name: CGPSConverterIsConverting
SwiftName: getter:CGPSConverter.isConverting(self:)

# CGPath
- Name: CGPathCreateCopy
SwiftName: CGPath.copy(self:)
@@ -206,7 +206,7 @@ Classes:
- Selector: 'shuffledArrayWithRandomSource:'
SwiftName: shuffled(using:)
MethodKind: Instance
- Name: GKARC4RandomSource
- Name: GKARC4RandomSource
Methods:
- Selector: 'dropValuesWithCount:'
SwiftName: dropValues(_:)
@@ -11,7 +11,7 @@ API notes are organized into a set of `.apinotes` files. Each
written in YAML (FIXME: to be) described below. These YAML sources
must be manually compiled into a binary representation (`.apinotesc`)
that the Swift compiler will lazily load when it builds code, also
described below.
described below.

# API Notes YAML Format

@@ -42,7 +42,7 @@ When updating API notes for a system module, recompile the API notes
and place the result in the appropriate directories listed above. The
Swift compiler itself need not be recompiled except in rare cases
where the changes affect how the SDK overlays are built. To recompile
API notes for a given module `$MODULE` and place them into their
API notes for a given module `$MODULE` and place them into their

### OS X
```
@@ -95,7 +95,7 @@ endfunction()
# ANALYZE_CODE_COVERAGE analyze_code_coverage
# RESULT_VAR_NAME result_var_name
# DEPLOYMENT_VERSION_IOS deployment_version_ios # If provided, overrides the default value of the iOS deployment target set by the Swift project for this compilation only.
#
#
# )
function(_add_variant_c_compile_link_flags)
set(oneValueArgs SDK ARCH BUILD_TYPE RESULT_VAR_NAME ENABLE_LTO ANALYZE_CODE_COVERAGE DEPLOYMENT_VERSION_IOS)
@@ -104,7 +104,7 @@ function(_add_variant_c_compile_link_flags)
"${oneValueArgs}"
""
${ARGN})

set(result
${${CFLAGS_RESULT_VAR_NAME}}
"-target" "${SWIFT_SDK_${CFLAGS_SDK}_ARCH_${CFLAGS_ARCH}_TRIPLE}")
@@ -1297,12 +1297,12 @@ function(add_swift_library name)
message(FATAL_ERROR

This comment has been minimized.

Copy link
@jamiecosner

jamiecosner Jul 24, 2019

Life changing success

"Either SHARED, STATIC, or OBJECT_LIBRARY must be specified")
endif()

if(SWIFTLIB_TARGET_LIBRARY)
if(NOT SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER)
list(APPEND SWIFTLIB_DEPENDS clang)
endif()

# If we are building this library for targets, loop through the various
# SDKs building the variants of this library.
list_intersect(
@@ -1675,7 +1675,7 @@ function(_add_swift_executable_single name)
# Determine compiler flags.
set(c_compile_flags)
set(link_flags)

# Add variant-specific flags.
_add_variant_c_compile_flags(
SDK "${SWIFTEXE_SINGLE_SDK}"
@@ -8,7 +8,7 @@ set(ICU_REQUIRED)
foreach(MODULE ${ICU_FIND_COMPONENTS})
string(TOUPPER "${MODULE}" MODULE)
string(TOLOWER "${MODULE}" module)
list(APPEND ICU_REQUIRED
list(APPEND ICU_REQUIRED
ICU_${MODULE}_INCLUDE_DIR ICU_${MODULE}_LIBRARIES)

pkg_check_modules(PC_ICU_${MODULE} QUIET icu-${module})
@@ -29,7 +29,7 @@ Structs and tuples currently share the same layout algorithm, noted as the
is as follows:

- Start with a **size** of **0** and an **alignment** of **1**.
- Iterate through the fields, in element order for tuples, or in ``var``
- Iterate through the fields, in element order for tuples, or in ``var``
declaration order for structs. For each field:

* Update **size** by rounding up to the **alignment of the field**, that is,
@@ -41,7 +41,7 @@ is as follows:
**alignment of the field**.

- The final **size** and **alignment** are the size and alignment of the
aggregate. The **stride** of the type is the final **size** rounded up to
aggregate. The **stride** of the type is the final **size** rounded up to
**alignment**.

Note that this differs from C or LLVM's normal layout rules in that *size*
@@ -852,7 +852,7 @@ The first identifier in a ``<private-decl-name>`` is a string that represents
the file the original declaration came from. It should be considered unique
within the enclosing module. The second identifier is the name of the entity.

Not all declarations marked ``private`` declarations will use the
Not all declarations marked ``private`` declarations will use the
``<private-decl-name>`` mangling; if the entity's context is enough to uniquely
identify the entity, the simple ``identifier`` form is preferred.

@@ -929,7 +929,7 @@ Types
type ::= 'b' type type // objc block function type
type ::= 'c' type type // C function pointer type
type ::= 'F' throws-annotation? type type // function type
type ::= 'f' throws-annotation? type type // uncurried function type
type ::= 'f' throws-annotation? type type // uncurried function type
type ::= 'G' type <type>+ '_' // generic type application
type ::= 'K' type type // @auto_closure function type
type ::= 'M' type // metatype without representation
@@ -25,7 +25,7 @@ This optimizes for the most common case—a single-target application
project—while not accidentally revealing entities to clients of a framework
module.

.. warning:: This document has not yet been updated for SE-0117, which adds the
.. warning:: This document has not yet been updated for SE-0117, which adds the
"open" level of access.


@@ -220,7 +220,7 @@ functionality beyond ``private``, ``fileprivate``, ``internal``, and ``public``.
limited with regards to extensions. Beyond that, however, a "class-only"
limit forces code to be declared within the class that might otherwise
naturally be a top-level helper or an extension method on another type.

``private`` and ``fileprivate`` serve the use case of limiting access to the
implementation details of a class (even from the rest of the module!) while
not tying access to the notion of type.
@@ -232,7 +232,7 @@ functionality beyond ``private``, ``fileprivate``, ``internal``, and ``public``.
plans for resilient APIs. Additionally, it increases the complexity of the
access control model for both the compiler and for developers, and like
"class-only" it is not immediately clear how it interacts with extensions.

Though it is not compiler-enforced, members that might be considered
"protected" are effectively publicly accessible, and thus should be marked
``public`` in Swift. They can still be documented as intended for overriding
@@ -42,18 +42,18 @@ if(LITRE_EXECUTABLE)
set(subdir_CMakeLists)

foreach(rst ${rst_files})
# Prepare a testing directory containing a CMakeLists.txt
# Prepare a testing directory containing a CMakeLists.txt
# and example files extracted from the .rst
set(test_dir "litre-tests/${rst}.litre-tests")

add_custom_command(
OUTPUT
OUTPUT
${test_dir}/CMakeLists.txt
COMMAND
${LITRE_EXECUTABLE}
COMMAND
${LITRE_EXECUTABLE}
--default_compiler=${CMAKE_BINARY_DIR}/bin/swift
"--dump_dir=${test_dir}"
--traceback
--traceback
--report=severe # suppress most .rst errors. We have lots of them.
${CMAKE_CURRENT_SOURCE_DIR}/${rst}
DEPENDS
@@ -71,7 +71,7 @@ if(LITRE_EXECUTABLE)
OUTPUT
litre-top-CMakeLists.cmake
COMMAND
${CMAKE_COMMAND} -DOUTPUT=litre-top-CMakeLists.cmake
${CMAKE_COMMAND} -DOUTPUT=litre-top-CMakeLists.cmake
-DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
-P ${CMAKE_CURRENT_SOURCE_DIR}/GenerateTopLevelLitreCMakeLists.cmake
${rst_files}
@@ -134,7 +134,7 @@ if (LLVM_ENABLE_DOXYGEN)
if (DOXYGEN_FOUND)
set(abs_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
set(abs_builddir ${CMAKE_CURRENT_BINARY_DIR})

if (HAVE_DOT)
set(DOT ${LLVM_PATH_DOT})
endif()
@@ -152,7 +152,7 @@ if (DOXYGEN_FOUND)
set(enable_external_search "NO")
set(extra_search_mappings "")
endif()

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)

@@ -164,11 +164,11 @@ if (DOXYGEN_FOUND)
set(enable_server_based_search)
set(enable_external_search)
set(extra_search_mappings)

add_custom_target(doxygen-swift
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating swift doxygen documentation." VERBATIM)
COMMENT "Generating swift doxygen documentation." VERBATIM)

if(LLVM_BUILD_DOCS)
add_dependencies(doxygen doxygen-swift)
@@ -59,8 +59,8 @@ of an l-value, but Swift does, so it's pertinent.
In general, the terms "pass-by-X" and "call-by-X" are used
interchangeably. It's unfortunate, because these conventions are
argument specific, and functions can be passed multiple arguments
that are each handled in a different way. As such, we'll prefer
"pass-by-X" for consistency and to emphasize that these conventions
that are each handled in a different way. As such, we'll prefer
"pass-by-X" for consistency and to emphasize that these conventions
are argument-specific.

Pass-by-reference