void llvtype(std::string_view k, Value* v)
{
std::cout << std::format("{}:{}:{}",
k,
(int)v->getType()->getTypeID(),
v->getName().str()
) << "
";
}
...
Function* Add1F = Function::Create(funcType, Function::ExternalLinkage, "add1", m.get());
BasicBlock* BB = BasicBlock::Create(*ctx, "entry", Add1F);
b.SetInsertPoint(BB);
llvtype("ii", b.getInt1(1));
llvtype("i32", b.getInt32(1));
llvtype("i64", b.getInt64(1));
llvtype("f32", ConstantFP::get(*ctx, APFloat((float)1.2)));
llvtype("f64", ConstantFP::get(*ctx, APFloat(1.2)));
llvtype("fun", Add1F);
llvtype("label", BB);