Format ref-structs correctly
This commit is contained in:
parent
94d1c15897
commit
8e7facc593
@ -564,13 +564,13 @@ namespace types {
|
||||
fields.push_back(field.second->codegen(builder, structs));
|
||||
}
|
||||
|
||||
auto ty = llvm::StructType::get(*builder.context, fields);
|
||||
auto ty = llvm::StructType::create(*builder.context, fields);
|
||||
if (this->m_name)
|
||||
ty->setName(*this->m_name);
|
||||
return ty;
|
||||
}
|
||||
else {
|
||||
auto ty = llvm::StructType::get(*builder.context);
|
||||
auto ty = llvm::StructType::create(*builder.context);
|
||||
if (this->m_name)
|
||||
ty->setName(*this->m_name);
|
||||
return ty;
|
||||
|
||||
@ -164,6 +164,10 @@ namespace types {
|
||||
std::string StructType::formatted() {
|
||||
std::stringstream out{ "" };
|
||||
out << "struct";
|
||||
if (this->m_is_ref)
|
||||
out << "(ref)";
|
||||
out << " ";
|
||||
|
||||
if (this->m_name) {
|
||||
out << *this->m_name << " ";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user