Skip to content

Commit 672ff5d

Browse files
committed
Add a comment to the InProcessThinBackend class and improve the other new class comments.
1 parent 1bbb222 commit 672ff5d

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

llvm/lib/LTO/LTO.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,8 +1435,8 @@ Error ThinBackendProc::emitFiles(
14351435
}
14361436

14371437
namespace {
1438-
// Base class for ThinLTO backends that perform code generation and insert the
1439-
// generated files back into the link.
1438+
/// Base class for ThinLTO backends that perform code generation and insert the
1439+
/// generated files back into the link.
14401440
class CGThinBackend : public ThinBackendProc {
14411441
protected:
14421442
AddStreamFn AddStream;
@@ -1464,6 +1464,8 @@ class CGThinBackend : public ThinBackendProc {
14641464
}
14651465
};
14661466

1467+
/// This backend performs code generation by scheduling a job to run on
1468+
/// an in-process thread when invoked for each task.
14671469
class InProcessThinBackend : public CGThinBackend {
14681470
protected:
14691471
FileCache Cache;
@@ -2184,12 +2186,12 @@ std::vector<int> lto::generateModulesOrdering(ArrayRef<BitcodeModule *> R) {
21842186
}
21852187

21862188
namespace {
2187-
// For this out-of-process backend no codegen is done when invoked for each
2188-
// task. Instead we generate the required information (e.g. the summary index
2189-
// shard, import list, etc..) to allow for the codegen to be performed
2190-
// externally (similar to WriteIndexesThinBackend). This backend's `wait`
2191-
// function then invokes an external distributor process to do backend
2192-
// compilations.
2189+
/// This out-of-process backend does not perform code generation when invoked
2190+
/// for each task. Instead, it generates the necessary information (e.g., the
2191+
/// summary index shard, import list, etc.) to enable code generation to be
2192+
/// performed externally, similar to WriteIndexesThinBackend. The backend's
2193+
/// `wait` function then invokes an external distributor process to carry out
2194+
/// the backend compilations.
21932195
class OutOfProcessThinBackend : public CGThinBackend {
21942196
using SString = SmallString<128>;
21952197

0 commit comments

Comments
 (0)