style(ir): 纠正代码位置
This commit is contained in:
@@ -5,6 +5,19 @@
|
||||
|
||||
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::string& Value::name() const { return name_; }
|
||||
|
||||
void Value::set_name(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_; }
|
||||
|
||||
ConstantInt::ConstantInt(int v) : Value(Type::Int32(), ""), value_(v) {}
|
||||
|
||||
} // namespace ir
|
||||
|
||||
Reference in New Issue
Block a user