[midend]解决标签重名问题

This commit is contained in:
rain2133
2025-07-25 12:35:35 +08:00
parent d50912ee4c
commit 12f63a0bf5
3 changed files with 3 additions and 5 deletions

View File

@@ -1248,7 +1248,7 @@ class Function : public Value {
friend class Module;
protected:
Function(Module *parent, Type *type, const std::string &name) : Value(type, name), parent(parent) {
blocks.emplace_back(new BasicBlock(this));
blocks.emplace_back(new BasicBlock(this, "entry_" + name)); ///< 创建一个入口基本块
}
public: