fix(ir): 修改了一下context的管理

This commit is contained in:
jing
2026-03-11 23:04:28 +08:00
parent fab6983d40
commit 0e5a75eaf3
13 changed files with 112 additions and 106 deletions

View File

@@ -10,10 +10,10 @@ Type::Type(Kind k) : kind_(k) {}
Type::Kind Type::kind() const { return kind_; }
std::shared_ptr<Type> Type::Void() { return DefaultContext().Void(); }
bool Type::IsVoid() const { return kind_ == Kind::Void; }
std::shared_ptr<Type> Type::Int32() { return DefaultContext().Int32(); }
bool Type::IsInt32() const { return kind_ == Kind::Int32; }
std::shared_ptr<Type> Type::PtrInt32() { return DefaultContext().PtrInt32(); }
bool Type::IsPtrInt32() const { return kind_ == Kind::PtrInt32; }
} // namespace ir