aboutsummaryrefslogtreecommitdiff
path: root/build2/cc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-12-04 13:24:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-12-04 13:24:37 +0200
commit7c3eada02a3a22ff109ef0631e75586308ab2587 (patch)
tree3e8452d5f25cb3124508deaca9d14842a0ced0f4 /build2/cc
parentad770fe609d1958a64e7364861296ac5407611d9 (diff)
Recognize empty cc.pattern
Diffstat (limited to 'build2/cc')
-rw-r--r--build2/cc/guess.cxx4
-rw-r--r--build2/cc/guess.hxx6
-rw-r--r--build2/cc/module.cxx2
3 files changed, 6 insertions, 6 deletions
diff --git a/build2/cc/guess.cxx b/build2/cc/guess.cxx
index 627283f..df7899b 100644
--- a/build2/cc/guess.cxx
+++ b/build2/cc/guess.cxx
@@ -1189,7 +1189,7 @@ namespace build2
}
path
- guess_default (lang xl, const string& c, const string* pat)
+ guess_default (lang xl, const string& c, const string& pat)
{
const char* s (nullptr);
@@ -1217,7 +1217,7 @@ namespace build2
}
}
- return path (apply_pattern (s, pat));
+ return path (apply_pattern (s, &pat));
}
}
}
diff --git a/build2/cc/guess.hxx b/build2/cc/guess.hxx
index e3a4d8c..86c9793 100644
--- a/build2/cc/guess.hxx
+++ b/build2/cc/guess.hxx
@@ -166,13 +166,13 @@ namespace build2
const strings* c_coptions,
const strings* x_coptions);
- // Given a language, toolchain id, and optionally a pattern, return an
- // appropriate default compiler path.
+ // Given a language, toolchain id, and optionally (empty) a pattern,
+ // return an appropriate default compiler path.
//
// For example, for (lang::cxx, gcc, *-4.9) we will get g++-4.9.
//
path
- guess_default (lang, const string& cid, const string* pattern);
+ guess_default (lang, const string& cid, const string& pattern);
}
}
diff --git a/build2/cc/module.cxx b/build2/cc/module.cxx
index d806583..196c2ce 100644
--- a/build2/cc/module.cxx
+++ b/build2/cc/module.cxx
@@ -88,7 +88,7 @@ namespace build2
path d (cc_loaded
? guess_default (x_lang,
cast<string> (rs["cc.id"]),
- cast_null<string> (rs["cc.pattern"]))
+ cast<string> (rs["cc.pattern"]))
: path (x_default));
// If this value was hinted, save it as commented out so that if the