Commit Graph

1189 Commits

Author SHA1 Message Date
Brent Royal-Gordon
a5955fc682 [NFC] Extract helper from moveFileIfDifferent()
This separates the “do these two files have the same contents?” logic from the “move or delete” logic in `moveFileIfDifferent()`, creating a useful helper function. It also ties the special-case behavior for the `destination` parameter to a flag, since we have a use where we won’t want that.
2019-08-22 19:37:53 -07:00
Roopesh Chander
cf9bb32527 Simplify code using ArrayRef 2019-08-21 20:09:53 +00:00
Roopesh Chander
5e01b55a04 [Parser][QoI] Suppress fixits to underscored platform condition kinds
"_endian" and "_runtime" aren't officially supported platform condition
kinds, so don't suggest changing to one of those.
2019-08-21 19:52:03 +00:00
Roopesh Chander
b75711c2d2 Make a .def file for PlatformConditionKind 2019-08-21 19:52:00 +00:00
Roopesh Chander
34fec7f1d4 [Parser][QoI] Offer fixit for changing the platform condition kind
For example, for "#if os(simulator)", offer a fixit to change
"os" to "targetEnvironment", instead of offering to change "simulator".

Resolves SR-11037.
2019-08-21 19:51:47 +00:00
Jonas Devlieghere
b4d268e9e1 Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances in the swift repo.
2019-08-15 11:32:39 -07:00
Brent Royal-Gordon
fb20b503ba Merge branch 'master' into master-rebranch
# Conflicts:
#	lib/ClangImporter/ClangImporter.cpp
#	test/IRGen/builtins.swift
#	test/IRGen/enum.sil
#	tools/driver/autolink_extract_main.cpp
#	utils/build-presets.ini
2019-08-08 17:07:59 -07:00
swift-ci
94134dd190 Merge remote-tracking branch 'origin/master' into master-next 2019-08-06 10:29:29 -07:00
Saleem Abdulrasool
5de7c6f33e Basic: normalise android triples when loading modules
The android API level can be ignored when loading the module.  The API
level controls the NDK APIs which are available and is equivalent to the
SDK version for Darwin.  This allows us to keep the API level in the
triple which future versions of Android's toolchain does.
2019-08-05 20:14:30 -07:00
swift-ci
d8217dfb31 Merge remote-tracking branch 'origin/master' into master-next 2019-08-02 14:49:48 -07:00
Jordan Rose
87b7ee1bc0 Tweak Swift-in-OS check to account for linker limitations
The backwards-deployment install name trickery we're using doesn't
handle "patch" components in version numbers, so we still need to
provide an rpath even when deploying to macOS 10.14.4.
2019-08-02 13:33:36 -07:00
Graydon Hoare
c2556ebf7d <rdar://43616773> Add swift::tripleHasSwiftInTheOS helper. 2019-08-02 13:27:02 -07:00
Puyan Lotfi
ede421e5f4 Adding fs::convertFDToNativeFile conversion to FileSystem.cpp. 2019-07-16 11:52:54 -07:00
swift-ci
606228e1ae Merge remote-tracking branch 'origin/master' into master-next 2019-07-15 14:49:05 -07:00
Xi Ge
f27ccabdb1 SourceKit/Formatting: avoid indenting for consecutive dot-member calls
rdar://52392291
2019-07-12 14:03:03 -07:00
swift-ci
c99285f107 Merge remote-tracking branch 'origin/master' into master-next 2019-07-09 16:30:28 -07:00
Marc Rasi
cd2556d07d fix memory leak in swift::sys::Cache
It fails to destroy a key in one case.
2019-07-09 11:14:48 -07:00
swift-ci
93e08a6674 Merge remote-tracking branch 'origin/master' into master-next 2019-06-06 11:29:01 -07:00
Mishal Shah
c2848e793f Merge pull request #25236 from apple/update-master-xcode-11-beta1
Update master to build with Xcode 11 beta, macOS 10.15, iOS 13, tvOS 13, and watchOS 6 SDKs
2019-06-06 11:22:40 -07:00
swift-ci
185cf45232 Merge remote-tracking branch 'origin/master' into master-next 2019-06-05 10:09:08 -07:00
Joe Groff
0e63852db2 Merge pull request #25240 from linux-on-ibm-z/cluster-to-apint
Basic: Use APInt to implement ClusteredBitVector
2019-06-05 10:03:32 -07:00
swift-ci
ed38fe6251 Merge remote-tracking branch 'origin/master' into master-next 2019-06-04 10:09:06 -07:00
Michael Munday
192bcb2007 Basic: Use APInt to implement ClusteredBitVector
Simplify the implementation of ClusteredBitVector by using an APInt
to represent the raw bits. This simplification will make it easier
to incrementally move to a representation of bit vectors that works
on both big- and little-endian machines.

This commit also removes reserve and reserveExtra from the API
since they were only used in one place and no longer have any effect
because memory allocation is now handled by the APInt class.
2019-06-04 14:05:10 +01:00
mishal_shah
1e38fc3030 Update master to build with Xcode 11 beta, macOS 10.15, iOS 13, tvOS 13, and watchOS 6 SDKs 2019-06-03 22:50:02 -07:00
Joe Groff
4ed8de10f9 Revert "Revert "Use autolinking to pull in compatibility libraries."" 2019-06-03 20:10:51 -07:00
swift-ci
fd329da063 Merge remote-tracking branch 'origin/master' into master-next 2019-06-03 14:29:47 -07:00
Joe Groff
a7cc3a38cc Revert "Use autolinking to pull in compatibility libraries." 2019-06-03 14:18:39 -07:00
swift-ci
40c3c8caa5 Merge remote-tracking branch 'origin/master' into master-next 2019-06-03 08:30:09 -07:00
Joe Groff
a740ee55b2 Merge pull request #25148 from jckarter/runtime-compatibility-autolink
Use autolinking to pull in compatibility libraries.
2019-06-03 08:22:49 -07:00
swift-ci
64a1b3eec6 Merge remote-tracking branch 'origin/master' into master-next 2019-06-02 15:10:19 -07:00
Saleem Abdulrasool
671576d2d3 Basic: silence MSVC pedantic warning (NFC)
The constructor here required multiple user-defined conversions which is
not exactly pedantically correct.  Add an explicit indicator that the
constructor being invoked is the `StringRef` constructor to convert the
`SmallString` to a `StringRef` which can then be implicitly converted to
the `Optional<StringRef>`.  This silences a MSVC warning (clang should
catch this with `-pedantic`).
2019-06-02 11:32:21 -07:00
Joe Groff
dffd1b27a1 Use autolinking to pull in compatibility libraries.
Many build systems that support Swift don't use swiftc to drive the linker. To make things
easier for these build systems, also use autolinking to pull in the needed compatibility
libraries. This is less ideal than letting the driver add it at link time, since individual
compile jobs don't know whether they're building an executable or not. Introduce a
`-disable-autolink-runtime-compatibility` flag, which build systems that do drive the linker
with swiftc can pass to avoid autolinking.

rdar://problem/50057445
2019-05-31 13:11:14 -07:00
Karoy Lorentey
d8aa67bb90 Merge branch 'master' into master-next
# Conflicts:
#	utils/build-script-impl
2019-05-29 13:09:01 -07:00
Argyrios Kyrtzidis
df721bd67f [CMake] Fix linker issue when doing a parser-lib only build 2019-05-29 11:28:25 -07:00
swift-ci
2447253c37 Merge remote-tracking branch 'origin/master' into master-next 2019-05-15 12:10:17 -07:00
Alexander Shaposhnikov
1525e9bfc5 [Windows] Add initial implementation for TaskQueue 2019-05-14 11:42:08 -07:00
swift-ci
67cf8799ed Merge remote-tracking branch 'origin/master' into master-next 2019-05-06 11:49:16 -07:00
Saleem Abdulrasool
218b37e1bb build: rename LLVM_COMPONENT_DEPENDS
This is not a target dependency but a target link.  Name the parameter
to be less misleading.  This also makes the name identical to the LLVM
parameter.
2019-05-04 19:58:28 -07:00
swift-ci
32e725208d Merge remote-tracking branch 'origin/master' into master-next 2019-05-01 18:10:37 -07:00
Slava Pestov
6d7d13fceb IRGen: Disable eager initialization of NSCoding adopters on newer targets
If a class does not have a custom @objc name, objc_getClass() can find
it at runtime by calling the Swift runtime's metadata demangler hook.

This avoids the static initializer on startup. If the class has a
custom runtime name we still need the static initializer unfortunately.

Fixes <rdar://problem/49660515>.
2019-05-01 17:43:58 -04:00
Slava Pestov
3b6ec6c651 IRGen: Move some deployment target checks to LangOptions 2019-05-01 15:13:12 -04:00
Bob Wilson
33d9e52e72 Merge remote-tracking branch 'origin/master' into master-next 2019-05-01 09:33:08 -07:00
Sam Lazarus
3d9b6396a1 Merge pull request #24059 from sl/sl/sr-10293
Allow var / let as parameter names but provide a warning and fixit to add backticks.
2019-04-26 09:30:23 -04:00
Sam Lazarus
2a38b48eea Parse / AST: Allow let / var as argument labels with a warning.
The diagnostic is now a warning and the new message alerts the user that
though it is valid to have let and var as argument label names,
they are interpreted as argument labels, not keywords.
2019-04-26 04:08:01 -04:00
Jordan Rose
f4487881e4 Add PrettyStackTraceSwiftVersion, and use it in the swiftc executable (#24235)
As pointed out on a recent JIRA, crash traces don't mention what
version of Swift you were running. Usually that can be gleaned from
the path, but not always.
2019-04-24 15:53:56 -07:00
swift-ci
efdafdce91 Merge remote-tracking branch 'origin/master' into master-next 2019-04-16 14:29:43 -07:00
Alex Langford
d8d93fd622 [CMake] Fix UUID include dir logic 2019-04-15 14:40:15 -07:00
Bob Wilson
7a8182221f Merge pull request #23765 from compnerd/r357552
Basic: adjust for LLVM SVN r357552
2019-04-08 13:34:58 -07:00
swift-ci
06a1281bb8 Merge remote-tracking branch 'origin/master' into master-next 2019-04-08 11:09:56 -07:00
Michael Gottesman
91dbbc3088 Merge pull request #23204 from compnerd/silence-in-the-library
Remove custom handling in add_swift_host_library
2019-04-08 10:49:42 -07:00