mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
Make inst namer and stringify print `Core.Char` and `Core.String` as `char` and `str` respectively. Plus a few cleanups.
This commit is contained in:
@@ -288,7 +288,7 @@ class Stringifier {
|
||||
|
||||
auto StringifyInst(InstId /*inst_id*/, ClassType inst) -> void {
|
||||
const auto& class_info = sem_ir_->classes().Get(inst.class_id);
|
||||
if (auto literal_info = NumericTypeLiteralInfo::ForType(*sem_ir_, inst);
|
||||
if (auto literal_info = TypeLiteralInfo::ForType(*sem_ir_, inst);
|
||||
literal_info.is_valid()) {
|
||||
literal_info.PrintLiteral(*sem_ir_, *out_);
|
||||
return;
|
||||
@@ -751,7 +751,7 @@ auto StringifySpecific(const File& sem_ir, SpecificId specific_id)
|
||||
// Print `Core.Int(N)` as `iN`.
|
||||
// TODO: This duplicates work done in StringifyInst for ClassType.
|
||||
const auto& class_info = sem_ir.classes().Get(class_decl.class_id);
|
||||
if (auto literal_info = NumericTypeLiteralInfo::ForType(
|
||||
if (auto literal_info = TypeLiteralInfo::ForType(
|
||||
sem_ir, ClassType{.type_id = TypeType::TypeId,
|
||||
.class_id = class_decl.class_id,
|
||||
.specific_id = specific_id});
|
||||
|
||||
Reference in New Issue
Block a user