Skip to content

Commit 6f28536

Browse files
committed
[NFC] Delete obsolete AccessPathTy-based code
This was all deprecated in earlier commits.
1 parent 4be67a6 commit 6f28536

File tree

3 files changed

+0
-39
lines changed

3 files changed

+0
-39
lines changed

include/swift/AST/Decl.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,11 +1464,7 @@ class ImportDecl final : public Decl,
14641464
private llvm::TrailingObjects<ImportDecl, ImportPath::Element> {
14651465
friend TrailingObjects;
14661466
friend class Decl;
1467-
public:
1468-
LLVM_ATTRIBUTE_DEPRECATED(typedef ImportPath::Element AccessPathElement,
1469-
"use ImportPath::Element instead");
14701467

1471-
private:
14721468
SourceLoc ImportLoc;
14731469
SourceLoc KindLoc;
14741470

@@ -1506,10 +1502,6 @@ class ImportDecl final : public Decl,
15061502
static_cast<size_t>(Bits.ImportDecl.NumPathElements) });
15071503
}
15081504

1509-
LLVM_ATTRIBUTE_DEPRECATED(
1510-
ArrayRef<ImportPath::Element> getFullAccessPath() const,
1511-
"use getImportPath() instead") { return getImportPath().getRaw(); }
1512-
15131505
ImportPath::Module getModulePath() const {
15141506
return getImportPath().getModulePath(getImportKind());
15151507
}

include/swift/AST/Module.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,6 @@ class ModuleDecl : public DeclContext, public TypeDecl {
203203
friend class DirectPrecedenceGroupLookupRequest;
204204

205205
public:
206-
LLVM_ATTRIBUTE_DEPRECATED(typedef ArrayRef<Located<Identifier>> AccessPathTy,
207-
"use ImportPath types instead");
208206
/// Convenience struct to keep track of a module along with its access path.
209207
struct alignas(uint64_t) ImportedModule {
210208
/// The access path from an import: `import Foo.Bar` -> `Foo.Bar`.
@@ -226,16 +224,6 @@ class ModuleDecl : public DeclContext, public TypeDecl {
226224
}
227225
};
228226

229-
LLVM_ATTRIBUTE_DEPRECATED(
230-
static bool matchesAccessPath(AccessPathTy AccessPath, DeclName Name),
231-
"use ImportPath::Access::matches() instead")
232-
{
233-
assert(AccessPath.size() <= 1 && "can only refer to top-level decls");
234-
235-
return AccessPath.empty()
236-
|| DeclName(AccessPath.front().Item).matchesRef(Name);
237-
}
238-
239227
/// Arbitrarily orders ImportedModule records, for inclusion in sets and such.
240228
class OrderImportedModules {
241229
public:
@@ -757,14 +745,6 @@ class ModuleDecl : public DeclContext, public TypeDecl {
757745
/// imports.
758746
void collectLinkLibraries(LinkLibraryCallback callback) const;
759747

760-
/// Returns true if the two access paths contain the same chain of
761-
/// identifiers.
762-
///
763-
/// Source locations are ignored here.
764-
LLVM_ATTRIBUTE_DEPRECATED(
765-
static bool isSameAccessPath(AccessPathTy lhs, AccessPathTy rhs),
766-
"use ImportPath::Access::isSameAs() instead");
767-
768748
/// Get the path for the file that this module came from, or an empty
769749
/// string if this is not applicable.
770750
StringRef getModuleFilename() const;

lib/AST/Module.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,17 +1221,6 @@ void ModuleDecl::getImportedModulesForLookup(
12211221
FORWARD(getImportedModulesForLookup, (modules));
12221222
}
12231223

1224-
bool ModuleDecl::isSameAccessPath(AccessPathTy lhs, AccessPathTy rhs) {
1225-
using AccessPathElem = Located<Identifier>;
1226-
if (lhs.size() != rhs.size())
1227-
return false;
1228-
return std::equal(lhs.begin(), lhs.end(), rhs.begin(),
1229-
[](const AccessPathElem &lElem,
1230-
const AccessPathElem &rElem) {
1231-
return lElem.Item == rElem.Item;
1232-
});
1233-
}
1234-
12351224
ModuleDecl::ReverseFullNameIterator::ReverseFullNameIterator(
12361225
const ModuleDecl *M) {
12371226
assert(M);

0 commit comments

Comments
 (0)