refactor(dev): 统一 IR/MIR 接口命名风格
This commit is contained in:
@@ -8,15 +8,15 @@ namespace ir {
|
||||
Value::Value(std::shared_ptr<Type> ty, std::string name)
|
||||
: type_(std::move(ty)), name_(std::move(name)) {}
|
||||
|
||||
const std::shared_ptr<Type>& Value::type() const { return type_; }
|
||||
const std::shared_ptr<Type>& Value::GetType() const { return type_; }
|
||||
|
||||
const std::string& Value::name() const { return name_; }
|
||||
const std::string& Value::GetName() const { return name_; }
|
||||
|
||||
void Value::set_name(std::string n) { name_ = std::move(n); }
|
||||
void Value::SetName(std::string n) { name_ = std::move(n); }
|
||||
|
||||
void Value::AddUser(Instruction* user) { users_.push_back(user); }
|
||||
|
||||
const std::vector<Instruction*>& Value::users() const { return users_; }
|
||||
const std::vector<Instruction*>& Value::GetUsers() const { return users_; }
|
||||
|
||||
ConstantInt::ConstantInt(std::shared_ptr<Type> ty, int v)
|
||||
: Value(std::move(ty), ""), value_(v) {}
|
||||
|
||||
Reference in New Issue
Block a user