mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 10:21:20 +00:00
Don't crash when dumping a fixed InstId (#7929)
This commit is contained in:
1 parent
59d53ab0a3
commit
06b3c69b7f
1 file changed
+2
-1
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user