mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
swift-api-digester: mark if a type declaration is pulled from an external module
To incorporate extensions to types from other modules, the tool sometimes needs to pull type declaration from external modules even though these modules are not under checking. We need a flag to explicitly mark such case.
This commit is contained in:
@@ -469,6 +469,9 @@ class SDKNodeDeclType: public SDKNodeDecl {
|
||||
std::vector<StringRef> SuperclassNames;
|
||||
std::vector<SDKNode*> Conformances;
|
||||
StringRef EnumRawTypeName;
|
||||
// Check whether the type declaration is pulled from an external module so we
|
||||
// can incorporate extensions in the interested module.
|
||||
bool IsExternal;
|
||||
public:
|
||||
SDKNodeDeclType(SDKNodeInitInfo Info);
|
||||
static bool classof(const SDKNode *N);
|
||||
@@ -477,6 +480,7 @@ public:
|
||||
void addConformance(SDKNode *Conf);
|
||||
ArrayRef<SDKNode*> getConformances() const { return Conformances; }
|
||||
NodeVector getConformances() { return Conformances; }
|
||||
bool isExternal() const { return IsExternal; }
|
||||
StringRef getSuperClassName() const {
|
||||
return SuperclassNames.empty() ? StringRef() : SuperclassNames.front();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user