mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 08:44:41 +01:00
Expand use of CheckIRId stores (#5820)
This is trying to make it clearer when vectors are being indexed with `CheckIRId`. The only one that I still kind of want to change is the `SmallVector<std::unique_ptr<CompilationUnit>>`, but because it's a `unique_ptr` that's a little more complex. I may not bother. Note, some of the changes around nuanced `SmallVector` interactions were based on trying to copy the way `SmallVector` itself takes arguments, like with range passing.
This commit is contained in:
@@ -53,7 +53,8 @@ FileContext::FileContext(Context& context, const SemIR::File& sem_ir,
|
||||
nullptr)),
|
||||
constants_(LoweredConstantStore::MakeWithExplicitSize(
|
||||
sem_ir.insts().size(), nullptr)),
|
||||
lowered_specifics_(sem_ir.generics(), {}),
|
||||
lowered_specifics_(sem_ir.generics(),
|
||||
llvm::SmallVector<SemIR::SpecificId>()),
|
||||
coalescer_(vlog_stream_, sem_ir.specifics()),
|
||||
vtables_(decltype(vtables_)::MakeForOverwrite(sem_ir.vtables())),
|
||||
specific_vtables_(sem_ir.specifics(), nullptr) {
|
||||
@@ -541,7 +542,7 @@ auto FileContext::BuildFunctionBody(SemIR::FunctionId function_id,
|
||||
// On crash, report the function we were lowering.
|
||||
PrettyStackTraceFunction stack_trace_entry([&](llvm::raw_ostream& output) {
|
||||
SemIR::DiagnosticLocConverter converter(
|
||||
context().tree_and_subtrees_getters(), &sem_ir());
|
||||
&context().tree_and_subtrees_getters(), &sem_ir());
|
||||
auto converted =
|
||||
converter.Convert(SemIR::LocId(declaration_function.definition_id),
|
||||
/*token_only=*/false);
|
||||
|
||||
Reference in New Issue
Block a user