Skip to content

Commit 5b90746

Browse files
committed
---
yaml --- r: 348719 b: refs/heads/master c: 9726704 h: refs/heads/master i: 348717: 8eb2163 348715: 1297e6b 348711: d80c897 348703: 69bf368
1 parent 3906727 commit 5b90746

File tree

3 files changed

+3
-25
lines changed

3 files changed

+3
-25
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: 0264687b394632ccf4e921fe65bee6c651729b45
2+
refs/heads/master: 972670436fb0b0d74bbcd4d34f52283510851425
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/Parse/ASTGen.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ class ASTGen {
3737

3838
// FIXME: remove when Syntax can represent all types and ASTGen can handle
3939
// them
40-
/// Types that cannot be represented by Syntax or generated by ASTGen.
41-
llvm::DenseMap<SourceLoc, TypeRepr *> Types;
42-
40+
/// Decl attributes that cannot be represented by Syntax or generated by
41+
/// ASTGen.
4342
llvm::DenseMap<SourceLoc, DeclAttributes> ParsedDeclAttrs;
4443

4544
public:
@@ -205,10 +204,6 @@ class ASTGen {
205204
TypeRepr *lookupType(syntax::TypeSyntax Type);
206205

207206
public:
208-
void addType(TypeRepr *Type, const SourceLoc Loc);
209-
bool hasType(const SourceLoc Loc) const;
210-
TypeRepr *getType(const SourceLoc Loc) const;
211-
212207
void addDeclAttributes(DeclAttributes attrs, const SourceLoc Loc);
213208
bool hasDeclAttributes(SourceLoc Loc) const;
214209
DeclAttributes getDeclAttributes(const SourceLoc Loc) const;

trunk/lib/Parse/ASTGen.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,6 @@ TypeRepr *ASTGen::generate(const TypeSyntax &Type, const SourceLoc Loc,
265265
else if (auto Unknown = Type.getAs<UnknownTypeSyntax>())
266266
TypeAST = generate(*Unknown, Loc);
267267

268-
// todo [gsoc]: handle InheritedTypeSyntax & ClassRestrictionTypeSyntax?
269-
270-
if (!TypeAST && hasType(advanceLocBegin(Loc, Type)))
271-
TypeAST = getType(advanceLocBegin(Loc, Type));
272-
273268
return cacheType(Type, TypeAST);
274269
}
275270

@@ -1065,18 +1060,6 @@ TypeRepr *ASTGen::lookupType(TypeSyntax Type) {
10651060
return Found != TypeCache.end() ? Found->second : nullptr;
10661061
}
10671062

1068-
void ASTGen::addType(TypeRepr *Type, const SourceLoc Loc) {
1069-
Types.insert({Loc, Type});
1070-
}
1071-
1072-
bool ASTGen::hasType(const SourceLoc Loc) const {
1073-
return Types.find(Loc) != Types.end();
1074-
}
1075-
1076-
TypeRepr *ASTGen::getType(const SourceLoc Loc) const {
1077-
return Types.find(Loc)->second;
1078-
}
1079-
10801063
void ASTGen::addDeclAttributes(DeclAttributes attrs, SourceLoc Loc) {
10811064
ParsedDeclAttrs.insert({Loc, attrs});
10821065
}

0 commit comments

Comments
 (0)