Skip to content

Commit

Permalink
Work with new CC conventions.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kurtenacker committed Sep 21, 2023
1 parent 5e7ba4b commit acabef8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/emit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,7 @@ const thorin::Def* FnDecl::emit(Emitter& emitter) const {
if (auto name_attr = export_attr->find("name"))
cont->set_name(name_attr->as<LiteralAttr>()->lit.as_string());
emitter.world.make_external(cont);
cont->attributes().cc = thorin::CC::C;
} else if (auto import_attr = attrs->find("import")) {
if (auto name_attr = import_attr->find("name"))
cont->set_name(name_attr->as<LiteralAttr>()->lit.as_string());
Expand All @@ -1690,7 +1691,7 @@ const thorin::Def* FnDecl::emit(Emitter& emitter) const {
if (auto name_attr = intern_attr->find("name"))
cont->set_name(name_attr->as<LiteralAttr>()->lit.as_string());
emitter.world.make_external(cont);
cont->attributes().cc = thorin::CC::Internal;
cont->attributes().cc = thorin::CC::Thorin;
}
}

Expand Down

0 comments on commit acabef8

Please sign in to comment.