Skip to content

Commit 7a3c935

Browse files
committed
Check if this constant item might already be compiled
1 parent 366c533 commit 7a3c935

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gcc/rust/backend/rust-compile-item.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ CompileItem::visit (HIR::StaticItem &var)
7373
void
7474
CompileItem::visit (HIR::ConstantItem &constant)
7575
{
76+
if (ctx->lookup_const_decl (constant.get_mappings ().get_hirid (),
77+
&reference))
78+
return;
79+
7680
// resolve the type
7781
TyTy::BaseType *resolved_type = nullptr;
7882
bool ok

0 commit comments

Comments
 (0)