Fix typo to remove un-needed variable copy.
The code's intent was clearly to use a reference, but a
missing ampersand resulted in a copy instead.
Change-Id: Id688a2b7090baa2e7e4f2da97765b69bb58fb459
Reviewed-on: https://gn-review.googlesource.com/c/gn/+/11824
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: David Turner <digit@google.com>
diff --git a/src/gn/ninja_binary_target_writer.cc b/src/gn/ninja_binary_target_writer.cc
index 0b7e4ea..3ad4320 100644
--- a/src/gn/ninja_binary_target_writer.cc
+++ b/src/gn/ninja_binary_target_writer.cc
@@ -307,7 +307,7 @@
// Followed by library search paths that have been recursively pushed
// through the dependency tree.
- const OrderedSet<SourceDir> all_lib_dirs = target_->all_lib_dirs();
+ const OrderedSet<SourceDir>& all_lib_dirs = target_->all_lib_dirs();
if (!all_lib_dirs.empty()) {
// Since we're passing these on the command line to the linker and not
// to Ninja, we need to do shell escaping.