[Macros] Small review changes

* New struct to store a pair of plugin search path and the server path
* typo
This commit is contained in:
Rintaro Ishizaki
2023-03-17 14:21:27 -07:00
parent 54884f05e5
commit b2542a7ce9
6 changed files with 25 additions and 19 deletions

View File

@@ -1494,11 +1494,12 @@ static bool ParseSearchPathArgs(SearchPathOptions &Opts,
for (const Arg *A : Args.filtered(OPT_external_plugin_path)) {
// '<plugin directory>#<plugin server executable path>'.
// FIXME: '#' can be used in the paths.
StringRef dylibPath;
StringRef serverPath;
std::tie(dylibPath, serverPath) = StringRef(A->getValue()).split('#');
Opts.ExternalPluginSearchPaths.push_back(
resolveSearchPath(dylibPath) + "#" + resolveSearchPath(serverPath));
{resolveSearchPath(dylibPath), resolveSearchPath(serverPath)});
}
for (const Arg *A : Args.filtered(OPT_L)) {