mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SR-11889: Using Located<T> instead of std::pair<SourceLoc, T>
This commit is contained in:
@@ -50,7 +50,7 @@ protected:
|
||||
void collectVisibleTopLevelModuleNamesImpl(SmallVectorImpl<Identifier> &names,
|
||||
StringRef extension) const;
|
||||
|
||||
using AccessPathElem = std::pair<Identifier, SourceLoc>;
|
||||
using AccessPathElem = Located<Identifier>;
|
||||
bool findModule(AccessPathElem moduleID,
|
||||
SmallVectorImpl<char> *moduleInterfacePath,
|
||||
std::unique_ptr<llvm::MemoryBuffer> *moduleBuffer,
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
///
|
||||
/// Note that even if this check succeeds, errors may still occur if the
|
||||
/// module is loaded in full.
|
||||
virtual bool canImportModule(std::pair<Identifier, SourceLoc> named) override;
|
||||
virtual bool canImportModule(Located<Identifier> named) override;
|
||||
|
||||
/// Import a module with the given module path.
|
||||
///
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
/// emits a diagnostic and returns a FailedImportModule object.
|
||||
virtual ModuleDecl *
|
||||
loadModule(SourceLoc importLoc,
|
||||
ArrayRef<std::pair<Identifier, SourceLoc>> path) override;
|
||||
ArrayRef<Located<Identifier>> path) override;
|
||||
|
||||
|
||||
virtual void loadExtensions(NominalTypeDecl *nominal,
|
||||
@@ -240,10 +240,10 @@ class MemoryBufferSerializedModuleLoader : public SerializedModuleLoaderBase {
|
||||
public:
|
||||
virtual ~MemoryBufferSerializedModuleLoader();
|
||||
|
||||
bool canImportModule(std::pair<Identifier, SourceLoc> named) override;
|
||||
bool canImportModule(Located<Identifier> named) override;
|
||||
ModuleDecl *
|
||||
loadModule(SourceLoc importLoc,
|
||||
ArrayRef<std::pair<Identifier, SourceLoc>> path) override;
|
||||
ArrayRef<Located<Identifier>> path) override;
|
||||
|
||||
/// Register a memory buffer that contains the serialized module for the given
|
||||
/// access path. This API is intended to be used by LLDB to add swiftmodules
|
||||
|
||||
Reference in New Issue
Block a user