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>
{}
void
-Early::visit_attributes (std::vector<AST::Attribute> attrs)
+Early::visit_attributes (std::vector<AST::Attribute> &attrs)
{
for (auto &attr : attrs)
{
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