Expose an ImportNonPublicDependencies LangOpt for LLDB (NFC).

This patch allows controlling the automatic import of private dependencies
separately from the DebuggerSupport option, which currently also triggers this
behavior. With explicit modules + precise compiler invocations LLDB is moving
towards no longer needing this behavior.

rdar://133088201
(cherry picked from commit a1ba7159e3)
This commit is contained in:
Adrian Prantl
2024-08-02 14:13:01 -07:00
parent eea22c2f09
commit f0902a9163
5 changed files with 17 additions and 18 deletions

View File

@@ -642,8 +642,8 @@ public:
/// How should \p dependency be loaded for a transitive import via \c this?
///
/// If \p debuggerMode, more transitive dependencies should try to be loaded
/// as they can be useful in debugging.
/// If \p importNonPublicDependencies, more transitive dependencies
/// should try to be loaded as they can be useful in debugging.
///
/// If \p isPartialModule, transitive dependencies should be loaded as we're
/// in merge-module mode.
@@ -655,12 +655,9 @@ public:
/// import. Reports non-public dependencies as required for a testable
/// client so it can access internal details, which in turn can reference
/// those non-public dependencies.
ModuleLoadingBehavior
getTransitiveLoadingBehavior(const Dependency &dependency,
bool debuggerMode,
bool isPartialModule,
StringRef packageName,
bool forTestable) const;
ModuleLoadingBehavior getTransitiveLoadingBehavior(
const Dependency &dependency, bool importNonPublicDependencies,
bool isPartialModule, StringRef packageName, bool forTestable) const;
};
template <typename T, typename RawData>