List function name not NameId in dominance failure. (#7916)

This commit is contained in:
Richard Smith authored and GitHub committed 2026-10-07 01:48:09 +00:00
1 parent 4a8993af2d
commit 5b587a885d
1 file changed
+3 -3
+3 -3
View File
@@ -401,9 +401,9 @@ auto DominatorTreeBuilder::Build() -> ErrorOr<DominatorTree> {
for (auto [i, block] : llvm::enumerate(body_blocks_)) {
if (!visited.test(i)) {
return ErrorBuilder()
<< "Block " << block << " in function " << function_.name_id
<< " is unreachable from entry block";
return ErrorBuilder() << "Block " << block << " in function "
<< file_.names().GetFormatted(function_.name_id)
<< " is unreachable from entry block";
}
}