Skip to content

Commit 04930ee

Browse files
committed
---
yaml --- r: 348895 b: refs/heads/master c: 907a8c3 h: refs/heads/master i: 348893: 61065f4 348891: 19f6d74 348887: c173b2f 348879: eca457c 348863: cd5c694
1 parent efc23f6 commit 04930ee

File tree

18 files changed

+268
-458
lines changed

18 files changed

+268
-458
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 40555302784023509f1b342b93d27c392e8f8099
2+
refs/heads/master: 907a8c37f589da6f6e3f116c933af1be887d41cc
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/include/swift/AST/USRGeneration.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12-
//
13-
// Unique Symbol References (USRs) provide a textual encoding for
14-
// declarations. These are used for indexing, analogous to how mangled names
15-
// are used in object files.
16-
//
17-
//===----------------------------------------------------------------------===//
1812

1913
#ifndef SWIFT_AST_USRGENERATION_H
2014
#define SWIFT_AST_USRGENERATION_H

trunk/include/swift/Basic/StringExtras.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "swift/Basic/LLVM.h"
2222
#include "swift/Basic/OptionSet.h"
2323
#include "llvm/ADT/SmallVector.h"
24+
#include "llvm/ADT/StringMap.h"
2425
#include "llvm/ADT/StringRef.h"
2526
#include "llvm/ADT/StringSet.h"
2627
#include "llvm/Support/Allocator.h"
@@ -64,8 +65,6 @@ namespace swift {
6465

6566
public:
6667
StringRef copyString(StringRef string);
67-
68-
llvm::BumpPtrAllocator &getAllocator() { return Allocator; }
6968
};
7069

7170
namespace camel_case {
@@ -431,13 +430,11 @@ StringRef matchLeadingTypeName(StringRef name, OmissionTypeName typeName);
431430
/// Describes a set of names with an inheritance relationship.
432431
class InheritedNameSet {
433432
const InheritedNameSet *Parent;
434-
llvm::StringSet<llvm::BumpPtrAllocator &> Names;
433+
llvm::StringSet<> Names;
435434

436435
public:
437436
/// Construct a new inherited name set with the given parent.
438-
InheritedNameSet(const InheritedNameSet *parent,
439-
llvm::BumpPtrAllocator &allocator)
440-
: Parent(parent), Names(allocator) { }
437+
explicit InheritedNameSet(const InheritedNameSet *parent) : Parent(parent) { }
441438

442439
// Add a new name to the set.
443440
void add(StringRef name);

trunk/include/swift/Parse/ASTGen.h

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ class ASTGen {
7979
//===--------------------------------------------------------------------===//
8080
// Expressions.
8181

82-
Expr *generate(const syntax::ExprSyntax &Expr, const SourceLoc Loc);
83-
Expr *generate(const syntax::IdentifierExprSyntax &Expr, const SourceLoc Loc);
84-
Expr *generate(const syntax::EditorPlaceholderExprSyntax &Expr,
85-
const SourceLoc Loc);
86-
Expr *generate(const syntax::SpecializeExprSyntax &Expr, const SourceLoc Loc);
8782
Expr *generate(const syntax::IntegerLiteralExprSyntax &Expr,
8883
const SourceLoc Loc);
8984
Expr *generate(const syntax::FloatLiteralExprSyntax &Expr,
@@ -101,13 +96,7 @@ class ASTGen {
10196
const SourceLoc Loc);
10297
Expr *generate(const syntax::UnknownExprSyntax &Expr, const SourceLoc Loc);
10398

104-
std::pair<DeclName, DeclNameLoc> generateUnqualifiedDeclName(
105-
const syntax::TokenSyntax &idTok,
106-
const Optional<syntax::DeclNameArgumentsSyntax> &args,
107-
const SourceLoc Loc);
108-
10999
private:
110-
111100
Expr *generateMagicIdentifierLiteralExpression(
112101
const syntax::TokenSyntax &PoundToken, const SourceLoc Loc);
113102

@@ -179,9 +168,10 @@ class ASTGen {
179168
//===--------------------------------------------------------------------===//
180169
// Generics.
181170

182-
void generate(const syntax::GenericArgumentClauseSyntax &Arg,
183-
const SourceLoc Loc, SourceLoc &lAngleLoc, SourceLoc &rAngleLoc,
184-
SmallVectorImpl<TypeRepr *> &args);
171+
TypeRepr *generate(const syntax::GenericArgumentSyntax &Arg,
172+
const SourceLoc Loc);
173+
llvm::SmallVector<TypeRepr *, 4>
174+
generate(const syntax::GenericArgumentListSyntax &Args, const SourceLoc Loc);
185175

186176
GenericParamList *
187177
generate(const syntax::GenericParameterClauseListSyntax &clause,

trunk/include/swift/Parse/Parser.h

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,8 +1480,6 @@ class Parser {
14801480
/// _)
14811481
/// \param loc The location of the label (empty if it doesn't exist)
14821482
void parseOptionalArgumentLabel(Identifier &name, SourceLoc &loc);
1483-
bool parseOptionalArgumentLabelSyntax(Optional<ParsedTokenSyntax> &name,
1484-
Optional<ParsedTokenSyntax> &colon);
14851483

14861484
/// Parse an unqualified-decl-name.
14871485
///
@@ -1500,20 +1498,10 @@ class Parser {
15001498
bool allowOperators=false,
15011499
bool allowZeroArgCompoundNames=false,
15021500
bool allowDeinitAndSubscript=false);
1503-
ParserStatus
1504-
parseUnqualifiedDeclNameSyntax(Optional<ParsedTokenSyntax> &identTok,
1505-
Optional<ParsedDeclNameArgumentsSyntax> &declNameArg,
1506-
bool afterDot, const Diagnostic &diag,
1507-
bool allowOperators=false,
1508-
bool allowZeroArgCompoundNames=false,
1509-
bool allowDeinitAndSubscript=false);
1510-
1511-
ParsedSyntaxResult<ParsedExprSyntax> parseExprIdentifierSyntax();
1512-
ParsedSyntaxResult<ParsedExprSyntax>
1513-
parseExprSpecializeSyntax(ParsedExprSyntax &&);
15141501

15151502
Expr *parseExprIdentifier();
1516-
Expr *parseExprEditorPlaceholder(SourceLoc loc, StringRef text);
1503+
Expr *parseExprEditorPlaceholder(Token PlaceholderTok,
1504+
Identifier PlaceholderId);
15171505

15181506
/// Parse a closure expression after the opening brace.
15191507
///

trunk/include/swift/SIL/SILConstants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ class SymbolicValue {
556556
void dump() const;
557557
};
558558

559-
static_assert(sizeof(SymbolicValue) == 2 * sizeof(uint64_t),
559+
static_assert(sizeof(SymbolicValue) == 2 * sizeof(void *),
560560
"SymbolicValue should stay small");
561561
static_assert(std::is_pod<SymbolicValue>::value,
562562
"SymbolicValue should stay POD");

trunk/lib/AST/Decl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4962,7 +4962,7 @@ getNameFromObjcAttribute(const ObjCAttr *attr, DeclName preferredName) {
49624962
ObjCSelector
49634963
AbstractStorageDecl::getObjCGetterSelector(Identifier preferredName) const {
49644964
// If the getter has an @objc attribute with a name, use that.
4965-
if (auto getter = getOpaqueAccessor(AccessorKind::Get)) {
4965+
if (auto getter = getParsedAccessor(AccessorKind::Get)) {
49664966
if (auto name = getNameFromObjcAttribute(getter->getAttrs().
49674967
getAttribute<ObjCAttr>(), preferredName))
49684968
return *name;
@@ -4992,7 +4992,7 @@ AbstractStorageDecl::getObjCGetterSelector(Identifier preferredName) const {
49924992
ObjCSelector
49934993
AbstractStorageDecl::getObjCSetterSelector(Identifier preferredName) const {
49944994
// If the setter has an @objc attribute with a name, use that.
4995-
auto setter = getOpaqueAccessor(AccessorKind::Set);
4995+
auto setter = getParsedAccessor(AccessorKind::Set);
49964996
auto objcAttr = setter ? setter->getAttrs().getAttribute<ObjCAttr>()
49974997
: nullptr;
49984998
if (auto name = getNameFromObjcAttribute(objcAttr, DeclName(preferredName))) {

trunk/lib/ClangImporter/ImportName.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,10 +1842,10 @@ const InheritedNameSet *NameImporter::getAllPropertyNames(
18421842
}
18431843

18441844
// Create the set of properties.
1845-
llvm::BumpPtrAllocator &alloc = scratch.getAllocator();
1846-
known = allProperties.insert({
1847-
std::pair<const clang::ObjCInterfaceDecl *, char>(classDecl, forInstance),
1848-
llvm::make_unique<InheritedNameSet>(parentSet, alloc) }).first;
1845+
known = allProperties.insert(
1846+
{ std::pair<const clang::ObjCInterfaceDecl *, char>(classDecl,
1847+
forInstance),
1848+
llvm::make_unique<InheritedNameSet>(parentSet) }).first;
18491849

18501850
// Local function to add properties from the given set.
18511851
auto addProperties = [&](clang::DeclContext::decl_range members) {

0 commit comments

Comments
 (0)