diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-08-01 12:43:27 +0200 |
---|---|---|
committer | P-E-P <32375388+P-E-P@users.noreply.github.com> | 2023-09-05 14:05:36 +0000 |
commit | a3284ac1baaa8b1795e3248d5e6d3abe7445abe1 (patch) | |
tree | d3f574ceca460e8914c883f4b88b6501158010d4 /gcc | |
parent | aa712861f41d7477ca7eb4f33fead1b288db735f (diff) | |
download | gcc-a3284ac1baaa8b1795e3248d5e6d3abe7445abe1.zip gcc-a3284ac1baaa8b1795e3248d5e6d3abe7445abe1.tar.gz gcc-a3284ac1baaa8b1795e3248d5e6d3abe7445abe1.tar.bz2 |
Change early resolver visit_attributes arguments
We do not need to copy the whole vector we can simply take a reference
instead.
gcc/rust/ChangeLog:
* resolve/rust-early-name-resolver-2.0.cc (Early::visit_attributes):
Change argument to reference.
* resolve/rust-early-name-resolver-2.0.h: Update function
prototype.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/resolve/rust-early-name-resolver-2.0.cc | 2 | ||||
-rw-r--r-- | gcc/rust/resolve/rust-early-name-resolver-2.0.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/rust/resolve/rust-early-name-resolver-2.0.cc b/gcc/rust/resolve/rust-early-name-resolver-2.0.cc index 65ec0d6..7373e62 100644 --- a/gcc/rust/resolve/rust-early-name-resolver-2.0.cc +++ b/gcc/rust/resolve/rust-early-name-resolver-2.0.cc @@ -175,7 +175,7 @@ Early::visit (AST::UseTreeGlob &use) {} void -Early::visit_attributes (std::vector<AST::Attribute> attrs) +Early::visit_attributes (std::vector<AST::Attribute> &attrs) { for (auto &attr : attrs) { diff --git a/gcc/rust/resolve/rust-early-name-resolver-2.0.h b/gcc/rust/resolve/rust-early-name-resolver-2.0.h index fe1c1f6..dc27319 100644 --- a/gcc/rust/resolve/rust-early-name-resolver-2.0.h +++ b/gcc/rust/resolve/rust-early-name-resolver-2.0.h @@ -58,7 +58,7 @@ public: void visit (AST::StructStruct &) override; private: - void visit_attributes (std::vector<AST::Attribute> attrs); + void visit_attributes (std::vector<AST::Attribute> &attrs); /** * Macros can either be resolved through textual scoping or regular path |