refactor(dev): 统一 IR/MIR 接口命名风格
This commit is contained in:
@@ -13,7 +13,7 @@ Function::Function(std::string name, std::shared_ptr<Type> ret_type)
|
||||
BasicBlock* Function::CreateBlock(const std::string& name) {
|
||||
auto block = std::make_unique<BasicBlock>(name);
|
||||
auto* ptr = block.get();
|
||||
ptr->set_parent(this);
|
||||
ptr->SetParent(this);
|
||||
blocks_.push_back(std::move(block));
|
||||
if (!entry_) {
|
||||
entry_ = ptr;
|
||||
@@ -21,11 +21,11 @@ BasicBlock* Function::CreateBlock(const std::string& name) {
|
||||
return ptr;
|
||||
}
|
||||
|
||||
BasicBlock* Function::entry() { return entry_; }
|
||||
BasicBlock* Function::GetEntry() { return entry_; }
|
||||
|
||||
const BasicBlock* Function::entry() const { return entry_; }
|
||||
const BasicBlock* Function::GetEntry() const { return entry_; }
|
||||
|
||||
const std::vector<std::unique_ptr<BasicBlock>>& Function::blocks() const {
|
||||
const std::vector<std::unique_ptr<BasicBlock>>& Function::GetBlocks() const {
|
||||
return blocks_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user