mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
add support to getTopLevelDecls for clang submodules (#76401)
rdar://126031510
This commit is contained in:
@@ -856,6 +856,12 @@ public:
|
||||
/// returns the module \c Foo.
|
||||
ModuleDecl *getTopLevelModule(bool overlay = false);
|
||||
|
||||
/// Returns whether or not this module is a submodule of the given module.
|
||||
/// If `this == M`, this returns false. If this is a submodule such as
|
||||
/// `Foo.Bar.Baz`, and the given module is either `Foo` or `Foo.Bar`, this
|
||||
/// returns true.
|
||||
bool isSubmoduleOf(const ModuleDecl *M) const;
|
||||
|
||||
bool isResilient() const {
|
||||
return getResilienceStrategy() != ResilienceStrategy::Default;
|
||||
}
|
||||
@@ -1095,15 +1101,6 @@ public:
|
||||
/// The order of the results is not guaranteed to be meaningful.
|
||||
void getPrecedenceGroups(SmallVectorImpl<PrecedenceGroupDecl*> &Results) const;
|
||||
|
||||
/// Determines whether this module should be recursed into when calling
|
||||
/// \c getDisplayDecls.
|
||||
///
|
||||
/// Some modules should not call \c getDisplayDecls, due to assertions
|
||||
/// in their implementation. These are usually implicit imports that would be
|
||||
/// recursed into for parsed modules. This function provides a guard against
|
||||
/// recusing into modules that should not have decls collected.
|
||||
bool shouldCollectDisplayDecls() const;
|
||||
|
||||
/// Finds all top-level decls that should be displayed to a client of this
|
||||
/// module.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user