标签:try set get for rtp view constant out tin
void llvtype(std::string_view k, Value* v)
{
std::cout << std::format("{}:{}:{}",
k,
(int)v->getType()->getTypeID(),
v->getName().str()
) << "\n";
}
...
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);
标签:try set get for rtp view constant out tin
原文地址:https://www.cnblogs.com/ajanuw/p/14863965.html