[6.2🍒] fix calls to llvm prefix mapping functions to use space-separated option format

This commit is contained in:
Sina Mahdavi
2025-05-27 17:25:22 -07:00
parent e744e35086
commit fabbbc87c8
4 changed files with 12 additions and 10 deletions

View File

@@ -35,6 +35,7 @@
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/LineIterator.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/PrefixMapper.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/VersionTuple.h"
#include "llvm/Support/WithColor.h"
@@ -2452,7 +2453,11 @@ static bool ParseSearchPathArgs(SearchPathOptions &Opts, ArgList &Args,
Opts.DeserializedPathRecoverer.addMapping(SplitMap.first, SplitMap.second);
}
for (StringRef Opt : Args.getAllArgValues(OPT_scanner_prefix_map)) {
Opts.ScannerPrefixMapper.push_back(Opt.str());
if (auto Mapping = llvm::MappedPrefix::getFromJoined(Opt)) {
Opts.ScannerPrefixMapper.push_back({Mapping->Old, Mapping->New});
} else {
Diags.diagnose(SourceLoc(), diag::error_prefix_mapping, Opt);
}
}
Opts.ResolvedPluginVerification |=