Commit Graph

74 Commits

Author SHA1 Message Date
Michael Gottesman
c62f31f5dc Inject llvm::SmallBitVector into namespace swift;
I also eliminated all llvm:: before SmallBitVector in the code base.
2018-09-21 09:49:25 -07:00
Bob Wilson
351bbe8a66 [master-next] Add new fixed-point builtin types from Clang r334718
These types are not mapped into Swift but this adds them to the switches
so that the build does not fail due to unhandled enumeration values.
2018-06-15 23:09:00 -07:00
Bob Wilson
c3e02955bb [master-next] Adjust for VersionTuple moving from clang to llvm.
LLVM r334399 (and related Clang changes) moved clang::VersionTuple to
llvm::VersionTuple. Update Swift to match.

Patch by Jason Molenda.
rdar://problem/41025046
2018-06-12 16:44:11 -07:00
Bob Wilson
06132c21e1 [master-next] Add new builtin fixed-point types from Clang r333923
These new types are not yet imported for Swift but they need to be
included in the switch cases to avoid -Wswitch warnings that get promoted
to errors when building with -Werror.
2018-06-04 17:31:23 -07:00
Bob Wilson
4555435370 [master-next] Update ClangImporter for new Char8 builtin type.
Clang r331244 added experimental support for a proposed char8_t type.
It is currently enabled only with a special flag so this change for
Swift only attempts to get the compiler to build, not to make use of
the new type.
2018-05-04 17:08:50 -07:00
Vedant Kumar
e58de7cd08 Fix a build break in ClangAdapter.cpp
The args() API on NonNullAttr changed in r327405. Update the usage here
to conform.
2018-03-13 15:27:46 -07:00
swift-ci
e8b0e7a81f Merge remote-tracking branch 'origin/master' into master-next 2017-09-15 16:49:46 -07:00
Jordan Rose
9a04bee421 [ClangImporter] Turn ImportNameVersion into a struct.
...so that we don't have to keep coming back to update it every major
release. And also so we can actually put methods on it instead of
using free functions.

No intended behavior change (yet).
2017-09-15 14:30:24 -07:00
Michael Gottesman
5c7685da57 [upstream-update] Update Swift for addition of clang::BuiltinType::Float16. 2017-09-08 17:15:53 -07:00
Jordan Rose
f8b7db4e76 Excise the terms "blacklist" and "whitelist" from Swift source. (#11687)
The etymology of these terms isn't about race, but "black" = "blocked"
and "white" = "allowed" isn't really a good look these days. In most
cases we weren't using these terms particularly precisely anyway, so
the rephrasing is actually an improvement.
2017-08-30 09:28:00 -07:00
Michael Gottesman
5f8a8944f2 [upsteam-update] Remove upstream removed clang::BuiltinType::OCLNDRange.
This is an opencl type that we did not use in the compiler anyways. Our only use
was to make sure that we had covered switches on clang builtin types (and
asserted if we ever hit that case in a switch).
2017-02-21 12:33:21 -08:00
Jordan Rose
a82e999197 [ClangImporter] Fix isUnavailableInSwift on non-Apple platforms.
Don't bail out early when there's no deprecated-as-unavailable mode;
we also use the loop to check for `availability(swift, unavailable)`.
No test because the only callers are for Objective-C declarations.
2017-01-23 15:31:37 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Michael Ilseman
e9613dccc7 [Import Name] Finish weaning importName() off of options.
Switch all of ImportName over to be version based, including
internally. NFC.
2016-12-14 13:28:48 -08:00
Hugh Bellamy
071ec47224 Fix errors and warnings build swift/clangImporter using MSVC on Windows (#5950) 2016-11-30 13:27:36 -08:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Jordan Rose
d7cc1fd81e [ClangImporter] C static-qualified array params are non-nullable. (#5617)
If the keyword 'static' also appears within the '[' and ']' of the
    array type derivation, then for each call to the function, the
    value of the corresponding actual argument shall provide access to
    the first element of an array with at least as many elements as
    specified by the size expression. (C11 6.7.6.3p7)

Limit this change to Swift 4 so as not to break existing code, though
use of 'static' in this way is rare to begin with and passing nil
would probably be an error anyway.

Small part of rdar://problem/25846421.
2016-11-16 09:14:28 -08:00
Jordan Rose
7659012401 [ClangImporter] Respect SwiftImportAsAccessors in APINotes. (#5728)
Swift side of this new flag. This allows Objective-C framework authors
to replace a pair of methods by properties without breaking source
compatibility. This is especially important for class properties,
which were only introduced last year.

Still to come: importing the accessors even when this flag isn't set,
in order to provide better QoI when migrating from a method interface
to a property interface.

Part of rdar://problem/28455962
2016-11-11 17:32:07 -08:00
Michael Ilseman
ead13d40ff [Import Name] Introduce contextual class Name Importer
Name Importer wraps references to the Swift context and other needed
encapsulation. The eventual goal is to allow name lookup tables to
live separately from the Impl, and do better Clang-instance-based
caching in the future, as well as general separation of concerns.

NFC
2016-09-28 22:37:24 -07:00
Jordan Rose
c0c76b33a9 Update more switch statements for recent Clang/LLVM update. (#4988)
We still don't handle __float128, so no functionality change.
2016-09-26 11:22:36 -07:00
practicalswift
9185c052a9 [gardening] Fix inconsistent headers 2016-09-14 20:48:28 +02:00
Michael Ilseman
1cbfdc9e58 [ClangImporter] Refactor omitNeedlessWordsInFunctionName
Pull omitNeedlessWordsInFunctionName off of the Impl, and into a
static function local to ImportName.cpp. Separate it out from the Impl
entirely. Though this adds a couple of extra ugly parameters, it's one
of the last bits of tie-in between importFullName and the Impl.
2016-09-12 21:05:36 -07:00
Michael Ilseman
abe701cdbd [ClangImporter] Refactor PlatformAvailability
By refactoring out PlatformAvailability from the ClangImporter, we can
more easily refactor out isUnavailableInSwift from the impl, which
will free us up to do more flexible import naming.
2016-09-12 21:05:36 -07:00
Michael Ilseman
15af7f224d [ClangImporter] Refactor Clang reasoning into new files.
Introduces new files ClangAdapter.h/cpp, which will serve as a
convenient place to put code reasoning about Clang details. Refactors
out most Clang-related is*, has*, and get* methods from the
ImporterImpl. In the future, an adapter class could help serve to
seperate the concerns of the importer from the details of how to
correctly use Clang APIs.
2016-09-12 21:02:09 -07:00