@@ -241,13 +241,22 @@ class ThinBackendProc {
241241 const std::string &NewModulePath) const ;
242242};
243243
244- // / A ThinBackend defines what happens after the thin-link phase during ThinLTO.
245- // / The details of this type definition aren't important; clients can only
246- // / create a ThinBackend using one of the create*ThinBackend() functions below.
244+ // / This callable defines the behavior of a ThinLTO backend after the thin-link
245+ // / phase. It accepts a configuration \p C, a combined module summary index
246+ // / \p CombinedIndex, a map of module identifiers to global variable summaries
247+ // / \p ModuleToDefinedGVSummaries, a function to add output streams \p
248+ // / AddStream, and a file cache \p Cache. It returns a unique pointer to a
249+ // / ThinBackendProc, which can be used to launch backends in parallel.
247250using ThinBackendFunction = std::function<std::unique_ptr<ThinBackendProc>(
248251 const Config &C, ModuleSummaryIndex &CombinedIndex,
249252 const DenseMap<StringRef, GVSummaryMapTy> &ModuleToDefinedGVSummaries,
250253 AddStreamFn AddStream, FileCache Cache)>;
254+
255+ // / This type defines the behavior following the thin-link phase during ThinLTO.
256+ // / It encapsulates a backend function and a strategy for thread pool
257+ // / parallelism. Clients should use one of the provided create*ThinBackend()
258+ // / functions to instantiate a ThinBackend. Parallelism defines the thread pool
259+ // / strategy to be used for processing.
251260struct ThinBackend {
252261 ThinBackend (ThinBackendFunction Func, ThreadPoolStrategy Parallelism)
253262 : Func(std::move(Func)), Parallelism(std::move(Parallelism)) {}
0 commit comments