fix(ir): 修改了一下context的管理
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user