style(ir): 纠正代码位置
This commit is contained in:
@@ -3,3 +3,22 @@
|
||||
// - 维护或可计算前驱/后继关系,用于 CFG 分析与优化
|
||||
|
||||
#include "ir/IR.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
namespace ir {
|
||||
|
||||
BasicBlock::BasicBlock(std::string name) : name_(std::move(name)) {}
|
||||
|
||||
const std::string& BasicBlock::name() const { return name_; }
|
||||
|
||||
bool BasicBlock::HasTerminator() const {
|
||||
return !instructions_.empty() && instructions_.back()->IsTerminator();
|
||||
}
|
||||
|
||||
const std::vector<std::unique_ptr<Instruction>>& BasicBlock::instructions()
|
||||
const {
|
||||
return instructions_;
|
||||
}
|
||||
|
||||
} // namespace ir
|
||||
|
||||
Reference in New Issue
Block a user