Skip to content

Commit 3293f23

Browse files
authored
---
yaml --- r: 349237 b: refs/heads/master-next c: 6bf5dae h: refs/heads/master i: 349235: e03f50c
1 parent 41e2d94 commit 3293f23

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+463
-495
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: 24a50030781919ea71269f3ba05aafb410ca8d12
3+
refs/heads/master-next: 6bf5daed17f80eb2e9ecb147fc0a6fee1b8c17b4
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/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,7 @@ if(SWIFT_NEED_EXPLICIT_LIBDISPATCH)
996996
-DCMAKE_CXX_COMPILER=${SWIFT_LIBDISPATCH_CXX_COMPILER}
997997
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
998998
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
999+
-DCMAKE_INSTALL_LIBDIR=lib
9991000
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
10001001
-DCMAKE_LINKER=${CMAKE_LINKER}
10011002
-DCMAKE_RANLIB=${CMAKE_RANLIB}

branches/master-next/docs/ABI/Mangling.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ Types
481481
type ::= 'Bf' NATURAL '_' // Builtin.Float<n>
482482
type ::= 'Bi' NATURAL '_' // Builtin.Int<n>
483483
type ::= 'BI' // Builtin.IntLiteral
484-
type ::= 'BO' // Builtin.UnknownObject
484+
type ::= 'BO' // Builtin.UnknownObject (no longer a distinct type, but still used for AnyObject)
485485
type ::= 'Bo' // Builtin.NativeObject
486486
type ::= 'Bp' // Builtin.RawPointer
487487
type ::= 'Bt' // Builtin.SILToken

branches/master-next/docs/ARCOptimization.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ is_unique performs depends on the argument type:
335335

336336
- Objective-C object types require an additional check that the
337337
dynamic object type uses native Swift reference counting:
338-
(Builtin.UnknownObject, unknown class reference, class existential)
338+
(unknown class reference, class existential)
339339

340340
- Bridged object types allow the dynamic object type check to be
341341
bypassed based on the pointer encoding:

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,6 @@ class ASTContext final {
605605
const CanType TheAnyType; /// This is 'Any', the empty protocol composition
606606
const CanType TheNativeObjectType; /// Builtin.NativeObject
607607
const CanType TheBridgeObjectType; /// Builtin.BridgeObject
608-
const CanType TheUnknownObjectType; /// Builtin.UnknownObject
609608
const CanType TheRawPointerType; /// Builtin.RawPointer
610609
const CanType TheUnsafeValueBufferType; /// Builtin.UnsafeValueBuffer
611610
const CanType TheSILTokenType; /// Builtin.SILToken

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

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,7 @@ class alignas(1 << DeclAlignInBits) Decl {
676676

677677
Decl(const Decl&) = delete;
678678
void operator=(const Decl&) = delete;
679+
SourceLoc getLocFromSource() const;
679680

680681
protected:
681682

@@ -1582,7 +1583,7 @@ enum class ImportKind : uint8_t {
15821583
class ImportDecl final : public Decl,
15831584
private llvm::TrailingObjects<ImportDecl, std::pair<Identifier,SourceLoc>> {
15841585
friend TrailingObjects;
1585-
1586+
friend class Decl;
15861587
public:
15871588
typedef std::pair<Identifier, SourceLoc> AccessPathElement;
15881589

@@ -1654,7 +1655,7 @@ class ImportDecl final : public Decl,
16541655
}
16551656

16561657
SourceLoc getStartLoc() const { return ImportLoc; }
1657-
SourceLoc getLoc() const { return getFullAccessPath().front().second; }
1658+
SourceLoc getLocFromSource() const { return getFullAccessPath().front().second; }
16581659
SourceRange getSourceRange() const {
16591660
return SourceRange(ImportLoc, getFullAccessPath().back().second);
16601661
}
@@ -1716,6 +1717,7 @@ class ExtensionDecl final : public GenericContext, public Decl,
17161717
std::pair<LazyMemberLoader *, uint64_t> takeConformanceLoaderSlow();
17171718

17181719
friend class ExtendedNominalRequest;
1720+
friend class Decl;
17191721
public:
17201722
using Decl::getASTContext;
17211723

@@ -1728,7 +1730,7 @@ class ExtensionDecl final : public GenericContext, public Decl,
17281730
ClangNode clangNode = ClangNode());
17291731

17301732
SourceLoc getStartLoc() const { return ExtensionLoc; }
1731-
SourceLoc getLoc() const { return ExtensionLoc; }
1733+
SourceLoc getLocFromSource() const { return ExtensionLoc; }
17321734
SourceRange getSourceRange() const {
17331735
return { ExtensionLoc, Braces.End };
17341736
}
@@ -2041,7 +2043,7 @@ class PatternBindingEntry {
20412043
class PatternBindingDecl final : public Decl,
20422044
private llvm::TrailingObjects<PatternBindingDecl, PatternBindingEntry> {
20432045
friend TrailingObjects;
2044-
2046+
friend class Decl;
20452047
SourceLoc StaticLoc; ///< Location of the 'static/class' keyword, if present.
20462048
SourceLoc VarLoc; ///< Location of the 'var' keyword.
20472049

@@ -2050,7 +2052,7 @@ class PatternBindingDecl final : public Decl,
20502052
PatternBindingDecl(SourceLoc StaticLoc, StaticSpellingKind StaticSpelling,
20512053
SourceLoc VarLoc, unsigned NumPatternEntries,
20522054
DeclContext *Parent);
2053-
2055+
SourceLoc getLocFromSource() const { return VarLoc; }
20542056
public:
20552057
static PatternBindingDecl *create(ASTContext &Ctx, SourceLoc StaticLoc,
20562058
StaticSpellingKind StaticSpelling,
@@ -2080,7 +2082,6 @@ class PatternBindingDecl final : public Decl,
20802082
SourceLoc getStartLoc() const {
20812083
return StaticLoc.isValid() ? StaticLoc : VarLoc;
20822084
}
2083-
SourceLoc getLoc() const { return VarLoc; }
20842085
SourceRange getSourceRange() const;
20852086

20862087
unsigned getNumPatternEntries() const {
@@ -2216,7 +2217,8 @@ class PatternBindingDecl final : public Decl,
22162217
/// global variables.
22172218
class TopLevelCodeDecl : public DeclContext, public Decl {
22182219
BraceStmt *Body;
2219-
2220+
SourceLoc getLocFromSource() const { return getStartLoc(); }
2221+
friend class Decl;
22202222
public:
22212223
TopLevelCodeDecl(DeclContext *Parent, BraceStmt *Body = nullptr)
22222224
: DeclContext(DeclContextKind::TopLevelCodeDecl, Parent),
@@ -2227,7 +2229,6 @@ class TopLevelCodeDecl : public DeclContext, public Decl {
22272229
void setBody(BraceStmt *b) { Body = b; }
22282230

22292231
SourceLoc getStartLoc() const;
2230-
SourceLoc getLoc() const { return getStartLoc(); }
22312232
SourceRange getSourceRange() const;
22322233

22332234
static bool classof(const Decl *D) {
@@ -2266,6 +2267,8 @@ class IfConfigDecl : public Decl {
22662267
/// The array is ASTContext allocated.
22672268
ArrayRef<IfConfigClause> Clauses;
22682269
SourceLoc EndLoc;
2270+
SourceLoc getLocFromSource() const { return Clauses[0].Loc; }
2271+
friend class Decl;
22692272
public:
22702273

22712274
IfConfigDecl(DeclContext *Parent, ArrayRef<IfConfigClause> Clauses,
@@ -2291,7 +2294,6 @@ class IfConfigDecl : public Decl {
22912294
}
22922295

22932296
SourceLoc getEndLoc() const { return EndLoc; }
2294-
SourceLoc getLoc() const { return Clauses[0].Loc; }
22952297

22962298
bool hadMissingEnd() const { return Bits.IfConfigDecl.HadMissingEnd; }
22972299

@@ -2308,7 +2310,8 @@ class PoundDiagnosticDecl : public Decl {
23082310
SourceLoc StartLoc;
23092311
SourceLoc EndLoc;
23102312
StringLiteralExpr *Message;
2311-
2313+
SourceLoc getLocFromSource() const { return StartLoc; }
2314+
friend class Decl;
23122315
public:
23132316
PoundDiagnosticDecl(DeclContext *Parent, bool IsError, SourceLoc StartLoc,
23142317
SourceLoc EndLoc, StringLiteralExpr *Message)
@@ -2337,7 +2340,6 @@ class PoundDiagnosticDecl : public Decl {
23372340
}
23382341

23392342
SourceLoc getEndLoc() const { return EndLoc; };
2340-
SourceLoc getLoc() const { return StartLoc; }
23412343

23422344
SourceRange getSourceRange() const {
23432345
return SourceRange(StartLoc, EndLoc);
@@ -2400,7 +2402,8 @@ class ValueDecl : public Decl {
24002402
friend class IsFinalRequest;
24012403
friend class IsDynamicRequest;
24022404
friend class IsImplicitlyUnwrappedOptionalRequest;
2403-
2405+
friend class Decl;
2406+
SourceLoc getLocFromSource() const { return NameLoc; }
24042407
protected:
24052408
ValueDecl(DeclKind K,
24062409
llvm::PointerUnion<DeclContext *, ASTContext *> context,
@@ -2473,7 +2476,6 @@ class ValueDecl : public Decl {
24732476
bool canInferObjCFromRequirement(ValueDecl *requirement);
24742477

24752478
SourceLoc getNameLoc() const { return NameLoc; }
2476-
SourceLoc getLoc() const { return NameLoc; }
24772479

24782480
bool isUsableFromInline() const;
24792481

@@ -6281,6 +6283,7 @@ AbstractStorageDecl::AccessorRecord::getAccessor(AccessorKind kind) const {
62816283
class EnumCaseDecl final : public Decl,
62826284
private llvm::TrailingObjects<EnumCaseDecl, EnumElementDecl *> {
62836285
friend TrailingObjects;
6286+
friend class Decl;
62846287
SourceLoc CaseLoc;
62856288

62866289
EnumCaseDecl(SourceLoc CaseLoc,
@@ -6293,6 +6296,7 @@ class EnumCaseDecl final : public Decl,
62936296
std::uninitialized_copy(Elements.begin(), Elements.end(),
62946297
getTrailingObjects<EnumElementDecl *>());
62956298
}
6299+
SourceLoc getLocFromSource() const { return CaseLoc; }
62966300

62976301
public:
62986302
static EnumCaseDecl *create(SourceLoc CaseLoc,
@@ -6304,11 +6308,6 @@ class EnumCaseDecl final : public Decl,
63046308
return {getTrailingObjects<EnumElementDecl *>(),
63056309
Bits.EnumCaseDecl.NumElements};
63066310
}
6307-
6308-
SourceLoc getLoc() const {
6309-
return CaseLoc;
6310-
}
6311-
63126311
SourceRange getSourceRange() const;
63136312

63146313
static bool classof(const Decl *D) {
@@ -6721,7 +6720,8 @@ class PrecedenceGroupDecl : public Decl {
67216720
SourceLoc higherThanLoc, ArrayRef<Relation> higherThan,
67226721
SourceLoc lowerThanLoc, ArrayRef<Relation> lowerThan,
67236722
SourceLoc rbraceLoc);
6724-
6723+
friend class Decl;
6724+
SourceLoc getLocFromSource() const { return NameLoc; }
67256725
public:
67266726
static PrecedenceGroupDecl *create(DeclContext *dc,
67276727
SourceLoc precedenceGroupLoc,
@@ -6741,7 +6741,6 @@ class PrecedenceGroupDecl : public Decl {
67416741
SourceLoc rbraceLoc);
67426742

67436743

6744-
SourceLoc getLoc() const { return NameLoc; }
67456744
SourceRange getSourceRange() const {
67466745
return { PrecedenceGroupLoc, RBraceLoc };
67476746
}
@@ -6860,7 +6859,8 @@ class OperatorDecl : public Decl {
68606859
ArrayRef<Identifier> Identifiers;
68616860
ArrayRef<SourceLoc> IdentifierLocs;
68626861
ArrayRef<NominalTypeDecl *> DesignatedNominalTypes;
6863-
6862+
SourceLoc getLocFromSource() const { return NameLoc; }
6863+
friend class Decl;
68646864
public:
68656865
OperatorDecl(DeclKind kind, DeclContext *DC, SourceLoc OperatorLoc,
68666866
Identifier Name, SourceLoc NameLoc,
@@ -6875,7 +6875,6 @@ class OperatorDecl : public Decl {
68756875
: Decl(kind, DC), OperatorLoc(OperatorLoc), NameLoc(NameLoc), name(Name),
68766876
DesignatedNominalTypes(DesignatedNominalTypes) {}
68776877

6878-
SourceLoc getLoc() const { return NameLoc; }
68796878

68806879
SourceLoc getOperatorLoc() const { return OperatorLoc; }
68816880
SourceLoc getNameLoc() const { return NameLoc; }
@@ -7038,6 +7037,10 @@ class MissingMemberDecl : public Decl {
70387037
&& "not enough bits");
70397038
setImplicit();
70407039
}
7040+
friend class Decl;
7041+
SourceLoc getLocFromSource() const {
7042+
return SourceLoc();
7043+
}
70417044
public:
70427045
static MissingMemberDecl *
70437046
create(ASTContext &ctx, DeclContext *DC, DeclName name,
@@ -7062,10 +7065,6 @@ class MissingMemberDecl : public Decl {
70627065
return Bits.MissingMemberDecl.NumberOfFieldOffsetVectorEntries;
70637066
}
70647067

7065-
SourceLoc getLoc() const {
7066-
return SourceLoc();
7067-
}
7068-
70697068
SourceRange getSourceRange() const {
70707069
return SourceRange();
70717070
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ class TypeMatcher {
107107
TRIVIAL_CASE(BuiltinRawPointerType)
108108
TRIVIAL_CASE(BuiltinNativeObjectType)
109109
TRIVIAL_CASE(BuiltinBridgeObjectType)
110-
TRIVIAL_CASE(BuiltinUnknownObjectType)
111110
TRIVIAL_CASE(BuiltinUnsafeValueBufferType)
112111
TRIVIAL_CASE(BuiltinVectorType)
113112
TRIVIAL_CASE(SILTokenType)

branches/master-next/include/swift/AST/TypeNodes.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ ABSTRACT_TYPE(Builtin, Type)
9898
BUILTIN_TYPE(BuiltinRawPointer, BuiltinType)
9999
BUILTIN_TYPE(BuiltinNativeObject, BuiltinType)
100100
BUILTIN_TYPE(BuiltinBridgeObject, BuiltinType)
101-
BUILTIN_TYPE(BuiltinUnknownObject, BuiltinType)
102101
BUILTIN_TYPE(BuiltinUnsafeValueBuffer, BuiltinType)
103102
BUILTIN_TYPE(BuiltinVector, BuiltinType)
104103
TYPE_RANGE(Builtin, BuiltinInteger, BuiltinVector)

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,19 +1311,6 @@ class BuiltinBridgeObjectType : public BuiltinType {
13111311
};
13121312
DEFINE_EMPTY_CAN_TYPE_WRAPPER(BuiltinBridgeObjectType, BuiltinType);
13131313

1314-
/// BuiltinUnknownObjectType - The builtin opaque Objective-C pointer type.
1315-
/// Useful for pushing an Objective-C type through swift.
1316-
class BuiltinUnknownObjectType : public BuiltinType {
1317-
friend class ASTContext;
1318-
BuiltinUnknownObjectType(const ASTContext &C)
1319-
: BuiltinType(TypeKind::BuiltinUnknownObject, C) {}
1320-
public:
1321-
static bool classof(const TypeBase *T) {
1322-
return T->getKind() == TypeKind::BuiltinUnknownObject;
1323-
}
1324-
};
1325-
DEFINE_EMPTY_CAN_TYPE_WRAPPER(BuiltinUnknownObjectType, BuiltinType);
1326-
13271314
/// BuiltinUnsafeValueBufferType - The builtin opaque fixed-size value
13281315
/// buffer type, into which storage for an arbitrary value can be
13291316
/// allocated using Builtin.allocateValueBuffer.

0 commit comments

Comments
 (0)