Skip to content

Commit c15129b

Browse files
committed
---
yaml --- r: 349203 b: refs/heads/master-next c: 8c4df3b h: refs/heads/master i: 349201: 5ffa17c 349199: 5b39f53
1 parent e1d7064 commit c15129b

File tree

107 files changed

+1471
-5739
lines changed

Some content is hidden

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

107 files changed

+1471
-5739
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: b9b4196470c1da2d681d9121099cd6f368544182
3+
refs/heads/master-next: 8c4df3b4c24f4d6f2ffec16f026fcec0605a5c2a
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/ASTTypeIDs.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
#include "swift/Basic/TypeID.h"
2222
namespace swift {
2323

24-
class AbstractFunctionDecl;
25-
class BraceStmt;
2624
class CustomAttr;
2725
class Decl;
2826
class GenericParamList;

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6329,7 +6329,9 @@ class EnumElementDecl : public DeclContext, public ValueDecl {
63296329

63306330
/// The raw value literal for the enum element, or null.
63316331
LiteralExpr *RawValueExpr;
6332-
6332+
/// The type-checked raw value expression.
6333+
Expr *TypeCheckedRawValueExpr = nullptr;
6334+
63336335
public:
63346336
EnumElementDecl(SourceLoc IdentifierLoc, DeclName Name,
63356337
ParameterList *Params,
@@ -6362,6 +6364,13 @@ class EnumElementDecl : public DeclContext, public ValueDecl {
63626364
bool hasRawValueExpr() const { return RawValueExpr; }
63636365
LiteralExpr *getRawValueExpr() const { return RawValueExpr; }
63646366
void setRawValueExpr(LiteralExpr *e) { RawValueExpr = e; }
6367+
6368+
Expr *getTypeCheckedRawValueExpr() const {
6369+
return TypeCheckedRawValueExpr;
6370+
}
6371+
void setTypeCheckedRawValueExpr(Expr *e) {
6372+
TypeCheckedRawValueExpr = e;
6373+
}
63656374

63666375
/// Return the containing EnumDecl.
63676376
EnumDecl *getParentEnum() const {

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,15 @@
1818
#ifndef SWIFT_BASIC_DIAGNOSTICENGINE_H
1919
#define SWIFT_BASIC_DIAGNOSTICENGINE_H
2020

21+
#include "swift/AST/Attr.h"
2122
#include "swift/AST/TypeLoc.h"
2223
#include "swift/AST/DeclNameLoc.h"
2324
#include "swift/AST/DiagnosticConsumer.h"
2425
#include "llvm/ADT/StringMap.h"
2526
#include "llvm/Support/Allocator.h"
26-
#include "llvm/Support/VersionTuple.h"
2727

2828
namespace swift {
2929
class Decl;
30-
class DeclAttribute;
3130
class DiagnosticEngine;
3231
class SourceManager;
3332
class ValueDecl;

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,8 +1116,6 @@ ERROR(missing_argument_named,none,
11161116
"missing argument for parameter %0 in call", (Identifier))
11171117
ERROR(missing_argument_positional,none,
11181118
"missing argument for parameter #%0 in call", (unsigned))
1119-
ERROR(missing_arguments_in_call,none,
1120-
"missing arguments for parameters %0 in call", (StringRef))
11211119
ERROR(extra_argument_named,none,
11221120
"extra argument %0 in call", (Identifier))
11231121
ERROR(extra_argument_positional,none,
@@ -3495,10 +3493,6 @@ ERROR(single_tuple_parameter_mismatch_normal,none,
34953493
(DescriptiveDeclKind, DeclBaseName, Type, StringRef))
34963494
ERROR(unknown_single_tuple_parameter_mismatch,none,
34973495
"single parameter of type %0 is expected in call", (Type))
3498-
ERROR(cannot_convert_single_tuple_into_multiple_arguments,none,
3499-
"%0 %select{%1 |}2expects %3 separate arguments"
3500-
"%select{|; remove extra parentheses to change tuple into separate arguments}4",
3501-
(DescriptiveDeclKind, DeclName, bool, unsigned, bool))
35023496

35033497
ERROR(enum_element_pattern_assoc_values_mismatch,none,
35043498
"pattern with associated values does not match enum case %0",

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919

2020
#include "swift/AST/CaptureInfo.h"
2121
#include "swift/AST/ConcreteDeclRef.h"
22-
#include "swift/AST/DeclContext.h"
2322
#include "swift/AST/DeclNameLoc.h"
2423
#include "swift/AST/FunctionRefKind.h"
2524
#include "swift/AST/ProtocolConformanceRef.h"
2625
#include "swift/AST/TrailingCallArguments.h"
2726
#include "swift/AST/TypeAlignments.h"
2827
#include "swift/AST/TypeLoc.h"
28+
#include "swift/AST/TypeRepr.h"
2929
#include "swift/AST/Availability.h"
3030
#include "swift/Basic/InlineBitfield.h"
3131
#include "llvm/Support/TrailingObjects.h"
@@ -40,9 +40,7 @@ namespace swift {
4040
class ArchetypeType;
4141
class ASTContext;
4242
class AvailabilitySpec;
43-
class IdentTypeRepr;
4443
class Type;
45-
class TypeRepr;
4644
class ValueDecl;
4745
class Decl;
4846
class DeclRefExpr;

branches/master-next/include/swift/Parse/ASTGen.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
#include "llvm/ADT/DenseMap.h"
2222

2323
namespace swift {
24-
class ComponentIdentTypeRepr;
25-
class TupleTypeRepr;
26-
2724
/// Generates AST nodes from Syntax nodes.
2825
class Parser;
2926
class ASTGen {

branches/master-next/include/swift/Reflection/Records.h

Lines changed: 10 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@ class FieldRecordFlags {
7070

7171
class FieldRecord {
7272
const FieldRecordFlags Flags;
73+
74+
public:
7375
const RelativeDirectPointer<const char> MangledTypeName;
7476
const RelativeDirectPointer<const char> FieldName;
7577

76-
public:
7778
FieldRecord() = delete;
7879

7980
bool hasMangledTypeName() const {
@@ -84,11 +85,8 @@ class FieldRecord {
8485
return Demangle::makeSymbolicMangledNameStringRef(MangledTypeName.get());
8586
}
8687

87-
StringRef getFieldName(uintptr_t Low, uintptr_t High) const {
88-
uintptr_t nameAddr = (uintptr_t)FieldName.get();
89-
if (nameAddr < Low || nameAddr > High)
90-
return "";
91-
return (const char *)nameAddr;
88+
StringRef getFieldName() const {
89+
return FieldName.get();
9290
}
9391

9492
bool isIndirectCase() const {
@@ -162,10 +160,10 @@ class FieldDescriptor {
162160
return reinterpret_cast<const FieldRecord *>(this + 1);
163161
}
164162

163+
public:
165164
const RelativeDirectPointer<const char> MangledTypeName;
166165
const RelativeDirectPointer<const char> Superclass;
167166

168-
public:
169167
FieldDescriptor() = delete;
170168

171169
const FieldDescriptorKind Kind;
@@ -227,46 +225,13 @@ class FieldDescriptor {
227225
}
228226
};
229227

230-
class FieldDescriptorIterator
231-
: public std::iterator<std::forward_iterator_tag, FieldDescriptor> {
232-
public:
233-
const void *Cur;
234-
const void * const End;
235-
FieldDescriptorIterator(const void *Cur, const void * const End)
236-
: Cur(Cur), End(End) {}
237-
238-
const FieldDescriptor &operator*() const {
239-
return *reinterpret_cast<const FieldDescriptor *>(Cur);
240-
}
241-
242-
const FieldDescriptor *operator->() const {
243-
return reinterpret_cast<const FieldDescriptor *>(Cur);
244-
}
245-
246-
FieldDescriptorIterator &operator++() {
247-
const auto &FR = this->operator*();
248-
const void *Next = reinterpret_cast<const char *>(Cur)
249-
+ sizeof(FieldDescriptor) + FR.NumFields * FR.FieldRecordSize;
250-
Cur = Next;
251-
return *this;
252-
}
253-
254-
bool operator==(FieldDescriptorIterator const &other) const {
255-
return Cur == other.Cur && End == other.End;
256-
}
257-
258-
bool operator!=(FieldDescriptorIterator const &other) const {
259-
return !(*this == other);
260-
}
261-
};
262-
263228
// Associated type records describe the mapping from an associated
264229
// type to the type witness of a conformance.
265230
class AssociatedTypeRecord {
231+
public:
266232
const RelativeDirectPointer<const char> Name;
267233
const RelativeDirectPointer<const char> SubstitutedTypeName;
268234

269-
public:
270235
StringRef getName() const {
271236
return Name.get();
272237
}
@@ -322,10 +287,9 @@ struct AssociatedTypeRecordIterator {
322287
// An associated type descriptor contains a collection of associated
323288
// type records for a conformance.
324289
struct AssociatedTypeDescriptor {
325-
private:
290+
public:
326291
const RelativeDirectPointer<const char> ConformingTypeName;
327292
const RelativeDirectPointer<const char> ProtocolTypeName;
328-
public:
329293

330294
uint32_t NumAssociatedTypes;
331295
uint32_t AssociatedTypeRecordSize;
@@ -357,46 +321,12 @@ struct AssociatedTypeDescriptor {
357321
}
358322
};
359323

360-
class AssociatedTypeIterator
361-
: public std::iterator<std::forward_iterator_tag, AssociatedTypeDescriptor> {
362-
public:
363-
const void *Cur;
364-
const void * const End;
365-
AssociatedTypeIterator(const void *Cur, const void * const End)
366-
: Cur(Cur), End(End) {}
367-
368-
const AssociatedTypeDescriptor &operator*() const {
369-
return *reinterpret_cast<const AssociatedTypeDescriptor *>(Cur);
370-
}
371-
372-
const AssociatedTypeDescriptor *operator->() const {
373-
return reinterpret_cast<const AssociatedTypeDescriptor *>(Cur);
374-
}
375-
376-
AssociatedTypeIterator &operator++() {
377-
const auto &ATR = this->operator*();
378-
size_t Size = sizeof(AssociatedTypeDescriptor) +
379-
ATR.NumAssociatedTypes * ATR.AssociatedTypeRecordSize;
380-
const void *Next = reinterpret_cast<const char *>(Cur) + Size;
381-
Cur = Next;
382-
return *this;
383-
}
384-
385-
bool operator==(AssociatedTypeIterator const &other) const {
386-
return Cur == other.Cur && End == other.End;
387-
}
388-
389-
bool operator!=(AssociatedTypeIterator const &other) const {
390-
return !(*this == other);
391-
}
392-
};
393-
394324
// Builtin type records describe basic layout information about
395325
// any builtin types referenced from the other sections.
396326
class BuiltinTypeDescriptor {
327+
public:
397328
const RelativeDirectPointer<const char> TypeName;
398329

399-
public:
400330
uint32_t Size;
401331

402332
// - Least significant 16 bits are the alignment.
@@ -424,42 +354,10 @@ class BuiltinTypeDescriptor {
424354
}
425355
};
426356

427-
class BuiltinTypeDescriptorIterator
428-
: public std::iterator<std::forward_iterator_tag, BuiltinTypeDescriptor> {
429-
public:
430-
const void *Cur;
431-
const void * const End;
432-
BuiltinTypeDescriptorIterator(const void *Cur, const void * const End)
433-
: Cur(Cur), End(End) {}
434-
435-
const BuiltinTypeDescriptor &operator*() const {
436-
return *reinterpret_cast<const BuiltinTypeDescriptor *>(Cur);
437-
}
438-
439-
const BuiltinTypeDescriptor *operator->() const {
440-
return reinterpret_cast<const BuiltinTypeDescriptor *>(Cur);;
441-
}
442-
443-
BuiltinTypeDescriptorIterator &operator++() {
444-
const void *Next = reinterpret_cast<const char *>(Cur)
445-
+ sizeof(BuiltinTypeDescriptor);
446-
Cur = Next;
447-
return *this;
448-
}
449-
450-
bool operator==(BuiltinTypeDescriptorIterator const &other) const {
451-
return Cur == other.Cur && End == other.End;
452-
}
453-
454-
bool operator!=(BuiltinTypeDescriptorIterator const &other) const {
455-
return !(*this == other);
456-
}
457-
};
458-
459357
class CaptureTypeRecord {
358+
public:
460359
const RelativeDirectPointer<const char> MangledTypeName;
461360

462-
public:
463361
CaptureTypeRecord() = delete;
464362

465363
bool hasMangledTypeName() const {
@@ -502,10 +400,10 @@ struct CaptureTypeRecordIterator {
502400
};
503401

504402
class MetadataSourceRecord {
403+
public:
505404
const RelativeDirectPointer<const char> MangledTypeName;
506405
const RelativeDirectPointer<const char> MangledMetadataSource;
507406

508-
public:
509407
MetadataSourceRecord() = delete;
510408

511409
bool hasMangledTypeName() const {
@@ -608,41 +506,6 @@ class CaptureDescriptor {
608506
}
609507
};
610508

611-
class CaptureDescriptorIterator
612-
: public std::iterator<std::forward_iterator_tag, CaptureDescriptor> {
613-
public:
614-
const void *Cur;
615-
const void * const End;
616-
CaptureDescriptorIterator(const void *Cur, const void * const End)
617-
: Cur(Cur), End(End) {}
618-
619-
const CaptureDescriptor &operator*() const {
620-
return *reinterpret_cast<const CaptureDescriptor *>(Cur);
621-
}
622-
623-
const CaptureDescriptor *operator->() const {
624-
return reinterpret_cast<const CaptureDescriptor *>(Cur);
625-
}
626-
627-
CaptureDescriptorIterator &operator++() {
628-
const auto &CR = this->operator*();
629-
const void *Next = reinterpret_cast<const char *>(Cur)
630-
+ sizeof(CaptureDescriptor)
631-
+ CR.NumCaptureTypes * sizeof(CaptureTypeRecord)
632-
+ CR.NumMetadataSources * sizeof(MetadataSourceRecord);
633-
Cur = Next;
634-
return *this;
635-
}
636-
637-
bool operator==(CaptureDescriptorIterator const &other) const {
638-
return Cur == other.Cur && End == other.End;
639-
}
640-
641-
bool operator!=(CaptureDescriptorIterator const &other) const {
642-
return !(*this == other);
643-
}
644-
};
645-
646509
} // end namespace reflection
647510
} // end namespace swift
648511

0 commit comments

Comments
 (0)