diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-03-04 13:45:34 +0000 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2022-03-07 12:06:20 +0000 |
commit | 7a3c935c0f220835c001307944587a84c5af0192 (patch) | |
tree | e11d47ff68f7a251e283ff7e3e8094f1b21b8c9f /gcc | |
parent | 366c53371ad40025984a98e01b02d452d49816aa (diff) | |
download | gcc-7a3c935c0f220835c001307944587a84c5af0192.zip gcc-7a3c935c0f220835c001307944587a84c5af0192.tar.gz gcc-7a3c935c0f220835c001307944587a84c5af0192.tar.bz2 |
Check if this constant item might already be compiled
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/backend/rust-compile-item.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-item.cc b/gcc/rust/backend/rust-compile-item.cc index d42cc1e..21cbb1c 100644 --- a/gcc/rust/backend/rust-compile-item.cc +++ b/gcc/rust/backend/rust-compile-item.cc @@ -73,6 +73,10 @@ CompileItem::visit (HIR::StaticItem &var) void CompileItem::visit (HIR::ConstantItem &constant) { + if (ctx->lookup_const_decl (constant.get_mappings ().get_hirid (), + &reference)) + return; + // resolve the type TyTy::BaseType *resolved_type = nullptr; bool ok |