Fix a comment.

I'm pretty sure `CodegenCx` applies to codegen units, rather than
compilation units.
This commit is contained in:
Nicholas Nethercote 2024-09-18 12:45:28 +10:00
parent badd8cc8f4
commit ccd6c6102d

View File

@ -35,8 +35,8 @@ use crate::type_::Type;
use crate::value::Value;
use crate::{attributes, coverageinfo, debuginfo, llvm, llvm_util};
/// There is one `CodegenCx` per compilation unit. Each one has its own LLVM
/// `llvm::Context` so that several compilation units may be optimized in parallel.
/// There is one `CodegenCx` per codegen unit. Each one has its own LLVM
/// `llvm::Context` so that several codegen units may be processed in parallel.
/// All other LLVM data structures in the `CodegenCx` are tied to that `llvm::Context`.
pub(crate) struct CodegenCx<'ll, 'tcx> {
pub tcx: TyCtxt<'tcx>,