mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Converting ModuleDecl::ImportedModule from std::pair to a dedicated struct. (#31360)
This commit is contained in:
@@ -108,7 +108,7 @@ public:
|
||||
/// Represents another module that has been imported as a dependency.
|
||||
class Dependency {
|
||||
public:
|
||||
ModuleDecl::ImportedModule Import = {};
|
||||
llvm::Optional<ModuleDecl::ImportedModule> Import = llvm::None;
|
||||
const StringRef RawPath;
|
||||
const StringRef RawSPIs;
|
||||
SmallVector<Identifier, 4> spiGroups;
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
}
|
||||
|
||||
bool isLoaded() const {
|
||||
return Import.second != nullptr;
|
||||
return Import.hasValue() && Import->importedModule != nullptr;
|
||||
}
|
||||
|
||||
bool isExported() const {
|
||||
|
||||
Reference in New Issue
Block a user