carbon-lang
carbon-lang copied to clipboard
Split a cross-file `Lower::Context` out of `Lower::FileContext`.
In preparation for lowering information from multiple SemIR::Files into a single llvm::Module. The primary purpose of this is to support lowering a local specific for an imported generic function, where the instructions for the generic function are in a different file than the instructions for the specific. See #5475 for a draft PR implementing that functionality on top of this.
The per-llvm::Module state now lives in Lower::Context, and Lower::FileContext tracks only the per-SemIR::File information. Lower::Context should not mention any SemIR IDs that are file-specific. For now, the C++ lowering and the specific coalescing logic are kept per-file for simplicity.