Skip to content

Commit 5bf93d8

Browse files
committed
Remove SyntaxASTMap
As far as I can tell, this hasn't ever been really used, it's certainly not used anymore.
1 parent 8ec8516 commit 5bf93d8

File tree

5 files changed

+0
-156
lines changed

5 files changed

+0
-156
lines changed

include/swift/AST/SyntaxASTMap.h

Lines changed: 0 additions & 58 deletions
This file was deleted.

include/swift/Syntax/Syntax.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434

3535
namespace swift {
3636

37-
class SyntaxASTMap;
38-
3937
namespace syntax {
4038

4139
struct SyntaxVisitor;
@@ -58,7 +56,6 @@ const auto NoParent = llvm::None;
5856
/// their children.
5957
class Syntax {
6058
friend struct SyntaxFactory;
61-
friend class swift::SyntaxASTMap;
6259

6360
protected:
6461
/// A strong reference to the root node of the tree in which this piece of

include/swift/Syntax/SyntaxData.h

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -295,30 +295,4 @@ class SyntaxData final
295295
} // end namespace syntax
296296
} // end namespace swift
297297

298-
// DenseMapInfo for RC<SyntaxData>, used for a Syntax Node -> lib/AST mapping.
299-
namespace llvm {
300-
using SD = swift::syntax::SyntaxData;
301-
using RCSD = swift::RC<SD>;
302-
template <> struct DenseMapInfo<RCSD> {
303-
static inline RCSD getEmptyKey() {
304-
return SD::make(nullptr, nullptr, 0);
305-
}
306-
static inline RCSD getTombstoneKey() {
307-
return SD::make(nullptr, nullptr, 0);
308-
}
309-
static unsigned getHashValue(const RCSD Value) {
310-
unsigned H = 0;
311-
H ^= DenseMapInfo<uintptr_t>::getHashValue(reinterpret_cast<const uintptr_t>(Value->getRaw().get()));
312-
H ^= DenseMapInfo<uintptr_t>::getHashValue(reinterpret_cast<const uintptr_t>(Value->getParent()));
313-
H ^= DenseMapInfo<swift::syntax::CursorIndex>::getHashValue(Value->getIndexInParent());
314-
return H;
315-
}
316-
static bool isEqual(const RCSD LHS, const RCSD RHS) {
317-
return LHS->getRaw().get() == RHS->getRaw().get() &&
318-
LHS->getParent() == RHS->getParent() &&
319-
LHS->getIndexInParent() == RHS->getIndexInParent();
320-
}
321-
};
322-
}
323-
324298
#endif // SWIFT_SYNTAX_SYNTAXDATA_H

lib/AST/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ add_swift_host_library(swiftAST STATIC
7474
ProtocolConformance.cpp
7575
RawComment.cpp
7676
RequirementEnvironment.cpp
77-
SyntaxASTMap.cpp
7877
SILLayout.cpp
7978
Stmt.cpp
8079
SubstitutionMap.cpp

lib/AST/SyntaxASTMap.cpp

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)