You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include "ir/IR.h"
|
|
|
|
namespace ir {
|
|
|
|
Function::Function(std::string name)
|
|
: Value(Type::Int32(), std::move(name)),
|
|
entry_(std::make_unique<BasicBlock>("entry")) {}
|
|
|
|
void Function::EnsureEntry() {
|
|
if (!entry_) {
|
|
entry_ = std::make_unique<BasicBlock>("entry");
|
|
}
|
|
}
|
|
|
|
} // namespace ir
|