mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ClangImporter: Look up availability domains defined in bridging headers.
This is very brittle in this first iteration. For now we require the declaration representing the availability domain be deserialized before it can be looked up by name since Clang does not have a lookup table for availabilty domains in its module representation. As a result, it only works for bridging headers that are not precompiled. Part of rdar://138441266.
This commit is contained in:
@@ -970,6 +970,12 @@ public:
|
||||
const ModuleDecl *importedModule,
|
||||
llvm::SmallSetVector<Identifier, 4> &spiGroups) const;
|
||||
|
||||
/// Finds the custom availability domain defined by this module with the
|
||||
/// given identifier and if one exists adds it to results.
|
||||
void
|
||||
lookupAvailabilityDomains(Identifier identifier,
|
||||
SmallVectorImpl<AvailabilityDomain> &results) const;
|
||||
|
||||
// Is \p attr accessible as an explicitly imported SPI from this module?
|
||||
bool isImportedAsSPI(const SpecializeAttr *attr,
|
||||
const ValueDecl *targetDecl) const;
|
||||
@@ -1234,11 +1240,6 @@ public:
|
||||
/// An empty `Version` is returned if the information is not available.
|
||||
version::Version getLanguageVersionBuiltWith() const;
|
||||
|
||||
/// Returns the custom availability domain defined by this module with the
|
||||
/// given identifier, if one exists.
|
||||
std::optional<AvailabilityDomain>
|
||||
getAvailabilityDomainForIdentifier(Identifier identifier) const;
|
||||
|
||||
void setAvailabilityDomains(const AvailabilityDomainMap &&map) {
|
||||
AvailabilityDomains = std::move(map);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user