Skip to content

Commit bab91bc

Browse files
committed
---
yaml --- r: 349447 b: refs/heads/master-next c: 3869e82 h: refs/heads/master i: 349445: fca05ce 349443: 3434e1a 349439: 5ea090b
1 parent 8f912c1 commit bab91bc

29 files changed

+837
-1039
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: 5c2395098bba38943d43a4a9015c85a927e2a7cc
3+
refs/heads/master-next: 3869e829fa4d1762a0b4f24b9ce456eb7ed9e8bc
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/include/swift/AST/Decl.h

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ class alignas(1 << DeclAlignInBits) Decl {
286286
protected:
287287
union { uint64_t OpaqueBits;
288288

289-
SWIFT_INLINE_BITFIELD_BASE(Decl, bitmax(NumDeclKindBits,8)+1+1+1+1+1+1+1,
289+
SWIFT_INLINE_BITFIELD_BASE(Decl, bitmax(NumDeclKindBits,8)+1+1+1+1+2+1,
290290
Kind : bitmax(NumDeclKindBits,8),
291291

292292
/// Whether this declaration is invalid.
@@ -301,10 +301,6 @@ class alignas(1 << DeclAlignInBits) Decl {
301301
/// Use getClangNode() to retrieve the corresponding Clang AST.
302302
FromClang : 1,
303303

304-
/// Whether we've already performed early attribute validation.
305-
/// FIXME: This is ugly.
306-
EarlyAttrValidation : 1,
307-
308304
/// The validation state of this declaration.
309305
ValidationState : 2,
310306

@@ -694,7 +690,6 @@ class alignas(1 << DeclAlignInBits) Decl {
694690
Bits.Decl.Invalid = false;
695691
Bits.Decl.Implicit = false;
696692
Bits.Decl.FromClang = false;
697-
Bits.Decl.EarlyAttrValidation = false;
698693
Bits.Decl.ValidationState = unsigned(ValidationState::Unchecked);
699694
Bits.Decl.EscapedFromIfConfig = false;
700695
}
@@ -836,14 +831,6 @@ class alignas(1 << DeclAlignInBits) Decl {
836831
/// Mark this declaration as implicit.
837832
void setImplicit(bool implicit = true) { Bits.Decl.Implicit = implicit; }
838833

839-
/// Whether we have already done early attribute validation.
840-
bool didEarlyAttrValidation() const { return Bits.Decl.EarlyAttrValidation; }
841-
842-
/// Set whether we've performed early attribute validation.
843-
void setEarlyAttrValidation(bool validated = true) {
844-
Bits.Decl.EarlyAttrValidation = validated;
845-
}
846-
847834
/// Get the validation state.
848835
ValidationState getValidationState() const {
849836
return ValidationState(Bits.Decl.ValidationState);

branches/master-next/include/swift/Basic/LangOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ namespace swift {
213213
unsigned SolverShrinkUnsolvedThreshold = 10;
214214

215215
/// Enable one-way constraints in function builders.
216-
bool FunctionBuilderOneWayConstraints = false;
216+
bool FunctionBuilderOneWayConstraints = true;
217217

218218
/// Disable the shrink phase of the expression type checker.
219219
bool SolverDisableShrink = false;

branches/master-next/include/swift/Option/FrontendOptions.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,10 @@ def enable_function_builder_one_way_constraints : Flag<["-"],
408408
"enable-function-builder-one-way-constraints">,
409409
HelpText<"Enable one-way constraints in the function builder transformation">;
410410

411+
def disable_function_builder_one_way_constraints : Flag<["-"],
412+
"disable-function-builder-one-way-constraints">,
413+
HelpText<"Disable one-way constraints in the function builder transformation">;
414+
411415
def solver_disable_shrink :
412416
Flag<["-"], "solver-disable-shrink">,
413417
HelpText<"Disable the shrink phase of expression type checking">;

branches/master-next/lib/AST/ASTVerifier.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -968,12 +968,8 @@ class Verifier : public ASTWalker {
968968
Overridden->dump(Out);
969969
abort();
970970
}
971-
}
972-
973-
if (D->didEarlyAttrValidation() &&
974-
D->getAttrs().hasAttribute<OverrideAttr>()) {
975-
if (!D->isInvalid() && D->hasInterfaceType() &&
976-
!isa<ClassDecl>(D->getDeclContext()) &&
971+
972+
if (!isa<ClassDecl>(D->getDeclContext()) &&
977973
!isa<ProtocolDecl>(D->getDeclContext()) &&
978974
!isa<ExtensionDecl>(D->getDeclContext())) {
979975
PrettyStackTraceDecl debugStack("verifying override", D);
@@ -983,7 +979,6 @@ class Verifier : public ASTWalker {
983979
}
984980
}
985981

986-
987982
verifyCheckedAlwaysBase(D);
988983
}
989984

branches/master-next/lib/ClangImporter/ImportDecl.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,6 @@ static void addSynthesizedTypealias(NominalTypeDecl *nominal, Identifier name,
14891489
name, SourceLoc(),
14901490
nullptr, nominal);
14911491
typealias->setUnderlyingType(underlyingType);
1492-
typealias->setEarlyAttrValidation(true);
14931492
typealias->setAccess(AccessLevel::Public);
14941493
typealias->setValidationToChecked();
14951494
typealias->setImplicit();

branches/master-next/lib/ClangImporter/ImporterImpl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,6 @@ class LLVM_LIBRARY_VISIBILITY ClangImporter::Implementation
12921292
true);
12931293
auto D = ::new (DeclPtr) DeclTy(std::forward<Targs>(Args)...);
12941294
D->setClangNode(ClangN);
1295-
D->setEarlyAttrValidation(true);
12961295
D->setAccess(access);
12971296
if (auto ASD = dyn_cast<AbstractStorageDecl>(D))
12981297
ASD->setSetterAccess(access);

branches/master-next/lib/Frontend/CompilerInvocation.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,10 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
441441

442442
if (Args.getLastArg(OPT_solver_disable_shrink))
443443
Opts.SolverDisableShrink = true;
444-
if (Args.getLastArg(OPT_enable_function_builder_one_way_constraints))
445-
Opts.FunctionBuilderOneWayConstraints = true;
444+
Opts.FunctionBuilderOneWayConstraints =
445+
Args.hasFlag(OPT_enable_function_builder_one_way_constraints,
446+
OPT_disable_function_builder_one_way_constraints,
447+
/*Default=*/true);
446448

447449
if (const Arg *A = Args.getLastArg(OPT_value_recursion_threshold)) {
448450
unsigned threshold;

branches/master-next/lib/Sema/DerivedConformanceEquatableHashable.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,6 @@ deriveEquatable_eq(
719719
parentDC);
720720
eqDecl->setImplicit();
721721
eqDecl->setUserAccessible(false);
722-
eqDecl->getAttrs().add(new (C) InfixAttr(/*implicit*/false));
723722

724723
// Add the @_implements(Equatable, ==(_:_:)) attribute
725724
if (generatedIdentifier != C.Id_EqualsOperator) {

0 commit comments

Comments
 (0)