refactor(dev): 统一 IR/MIR 接口命名风格
This commit is contained in:
@@ -10,26 +10,26 @@ namespace ir {
|
||||
|
||||
BasicBlock::BasicBlock(std::string name) : name_(std::move(name)) {}
|
||||
|
||||
const std::string& BasicBlock::name() const { return name_; }
|
||||
const std::string& BasicBlock::GetName() const { return name_; }
|
||||
|
||||
Function* BasicBlock::parent() const { return parent_; }
|
||||
Function* BasicBlock::GetParent() const { return parent_; }
|
||||
|
||||
void BasicBlock::set_parent(Function* parent) { parent_ = parent; }
|
||||
void BasicBlock::SetParent(Function* parent) { parent_ = parent; }
|
||||
|
||||
bool BasicBlock::HasTerminator() const {
|
||||
return !instructions_.empty() && instructions_.back()->IsTerminator();
|
||||
}
|
||||
|
||||
const std::vector<std::unique_ptr<Instruction>>& BasicBlock::instructions()
|
||||
const std::vector<std::unique_ptr<Instruction>>& BasicBlock::GetInstructions()
|
||||
const {
|
||||
return instructions_;
|
||||
}
|
||||
|
||||
const std::vector<BasicBlock*>& BasicBlock::predecessors() const {
|
||||
const std::vector<BasicBlock*>& BasicBlock::GetPredecessors() const {
|
||||
return predecessors_;
|
||||
}
|
||||
|
||||
const std::vector<BasicBlock*>& BasicBlock::successors() const {
|
||||
const std::vector<BasicBlock*>& BasicBlock::GetSuccessors() const {
|
||||
return successors_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user