Commit Graph

17 Commits

Author SHA1 Message Date
Martin Boehme
d806ba53f6 Give OptionSet an initializer_list constructor.
This makes it easier to specify OptionSet arguments.

Also modify appropriate uses of ModuleDecl::ImportFilter to take
advantage of the new constructor.
2020-06-22 06:57:29 +02:00
Robert Widmann
581d0076f2 [NFC] Mark The OptionSet API constexpr
All of these bit manipulation primitives have been constexpr-able for
a while now.
2020-02-26 16:59:42 -08:00
Brent Royal-Gordon
03832cbc9b [NFC] Allow ImportedModuleDesc to be a DenseMap key 2020-02-18 11:07:12 -08:00
Jordan Rose
0ba6c495ba Add @_implementationOnly
This is an attribute that gets put on an import in library FooKit to
keep it from being a requirement to import FooKit. It's not checked at
all, meaning that in this form it is up to the author of FooKit to
make sure nothing in its API or ABI depends on the implementation-only
dependency. There's also no debugging support here (debugging FooKit
/should/ import the implementation-only dependency if it's present).

The goal is to get to a point where it /can/ be checked, i.e. FooKit
developers are prevented from writing code that would rely on FooKit's
implementation-only dependency being present when compiling clients of
FooKit. But right now it's not.

rdar://problem/48985979
2019-03-28 15:57:53 -07:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01: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
Dan Raviv
29d76f3b68 Canonize swift header files headers and footers
- Added missing ifdef guard in PointerIntEnum header
- Consistent naming convention for ifdef guards
- Consistent 'end namespace swift'
- Consistent single EOL at end of header files
2016-03-23 09:04:12 +02:00
practicalswift
1339b5403b Consistent use of header comment format.
Correct format:
//===--- Name of file - Description ----------------------------*- Lang -*-===//
2016-01-04 13:26:31 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Jordan Rose
6cf9576a05 Use preferred pattern for operator| on the enum used in a swift::OptionSet.
...and add a static_assert to OptionSet to enforce it. There are two holes
allowed: if it's not an enum class, the default operator| is acceptable, and
if it /is/ an enum class, not defining operator| is also acceptable. We may
want to tighten this up later.

No functionality change.

Swift SVN r30207
2015-07-15 00:48:53 +00:00
Jordan Rose
e618ac37f7 Conditionally give OptionSet a conversion to intptr_t.
...so that OptionSet can be used as the "integer" in a PointerIntPair.

Swift SVN r24528
2015-01-19 23:08:52 +00:00
Jordan Rose
2170a02b16 Fix implementation of OptionSet::contains.
AFAIK no functionality change because no one's been using OptionSet::contains
for anything but single flags.

Swift SVN r24527
2015-01-19 23:08:48 +00:00
Chris Lattner
9db2d73e46 fix the first-line comment.
Swift SVN r12595
2014-01-20 18:22:18 +00:00
Doug Gregor
9f75013056 Eliminate OptionSet's not-technically-correct operator~.
Swift SVN r12594
2014-01-20 18:17:55 +00:00
Doug Gregor
11656c9798 Introduce the ParseDeclOptions option set in the Parser. NFC.
Swift SVN r12588
2014-01-20 17:38:12 +00:00
Doug Gregor
810bb07852 Switch some "unsigned options" over to TypeResolutionOptions.
OptionSet gets construction from "None" and a difference computation. NFC.


Swift SVN r12582
2014-01-20 16:42:20 +00:00
Doug Gregor
da879baa12 Introduce a typed option set template, OptionSet.
Use it to replace the error-prone use of "unsigned" to pass flags
through type resolution.


Swift SVN r12580
2014-01-20 16:20:21 +00:00