mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 10:31:03 +01:00
Add name resolution information to trace stream (#2986)
Adds the following information about name resolution to the trace output: * Name resolution process ``` ** resolving stmt | decl `<stmt | decl>` (<source_location>) ... ** finished resolving stmt | decl `<stmt | decl>` (<source_location>) ``` * When a name is added to the static scope ``` --- declared `<name>` as `<entity>` in `<scope>` (<source_location>) ``` * When a name is resolved ``` --- resolved `<name>` as `<result>` in `<scope>` (<source_location>) ``` * Marking a name declared/usable ``` --- marked `<name>` <usable | declared but not usable> in `<scope>` ```
This commit is contained in:
@@ -45,7 +45,7 @@ auto AnalyzeProgram(Nonnull<Arena*> arena, AST ast,
|
||||
if (trace_stream->is_enabled()) {
|
||||
*trace_stream << "********** resolving names **********\n";
|
||||
}
|
||||
CARBON_RETURN_IF_ERROR(ResolveNames(ast));
|
||||
CARBON_RETURN_IF_ERROR(ResolveNames(ast, trace_stream));
|
||||
|
||||
set_prog_phase.update_phase(ProgramPhase::ControlFlowResolution);
|
||||
if (trace_stream->is_enabled()) {
|
||||
|
||||
Reference in New Issue
Block a user