aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/common.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/cc/common.cxx')
-rw-r--r--build2/cc/common.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/build2/cc/common.cxx b/build2/cc/common.cxx
index ca73483..c6ef3bd 100644
--- a/build2/cc/common.cxx
+++ b/build2/cc/common.cxx
@@ -431,11 +431,9 @@ namespace build2
{
// This is import.
//
- optional<string> ext;
-
- // Changes name.
- //
- const target_type* tt (s.find_target_type (n, ext, location ()));
+ auto rp (s.find_target_type (n, location ())); // Note: changes name.
+ const target_type* tt (rp.first);
+ optional<string>& ext (rp.second);
if (tt == nullptr)
fail << "unknown target type '" << n.type << "' in library " << n;