Don't crash when dumping a fixed InstId (#7929)

This commit is contained in:
Dana Jansens authored and GitHub committed 2026-10-09 16:42:20 +00:00
1 parent 59d53ab0a3
commit 06b3c69b7f
1 file changed
+2 -1
+2 -1
View File
@@ -456,7 +456,8 @@ LLVM_DUMP_METHOD auto Dump(const File& file, InstBlockId inst_block_id)
LLVM_DUMP_METHOD auto Dump(const File& file, InstId inst_id) -> std::string {
RawStringOstream out;
out << DumpInstSummary(file, inst_id);
if (!inst_id.has_value()) {
if (inst_id == InstId::None || inst_id == InstId::InitTombstone ||
inst_id == InstId::ImplWitnessTablePlaceholder) {
return out.TakeStr();
}