mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 11:11:05 +01:00
Fix mem usage tracking of semir (#4684)
The call got misplaced during refactoring.
This commit is contained in:
@@ -442,10 +442,6 @@ class CompilationUnit {
|
||||
|
||||
sem_ir_.emplace(&*parse_tree_, check_ir_id, parse_tree_->packaging_decl(),
|
||||
value_stores_, input_filename_);
|
||||
if (mem_usage_) {
|
||||
mem_usage_->Collect("sem_ir_", *sem_ir_);
|
||||
}
|
||||
|
||||
sem_ir_converter_.emplace(node_converters, &*sem_ir_);
|
||||
return {.consumer = consumer_,
|
||||
.value_stores = &value_stores_,
|
||||
@@ -465,6 +461,10 @@ class CompilationUnit {
|
||||
// to wait for code generation.
|
||||
consumer_->Flush();
|
||||
|
||||
if (mem_usage_) {
|
||||
mem_usage_->Collect("sem_ir_", *sem_ir_);
|
||||
}
|
||||
|
||||
if (options_.dump_raw_sem_ir && IncludeInDumps()) {
|
||||
CARBON_VLOG("*** Raw SemIR::File ***\n{0}\n", *sem_ir_);
|
||||
sem_ir_->Print(driver_env_->output_stream, options_.builtin_sem_ir);
|
||||
|
||||
Reference in New Issue
Block a user