} else {
// Baseline is `i` or `e`
if (auto E = getExtensionVersion(
- std::string(1, Baseline), Exts, Major, Minor, ConsumeLength,
+ StringRef(&Baseline, 1), Exts, Major, Minor, ConsumeLength,
EnableExperimentalExtension, ExperimentalExtensionVersionCheck)) {
if (!IgnoreUnknown)
return std::move(E);
// If IgnoreUnknown, then ignore an unrecognised version of the baseline
// ISA and just use the default supported version.
consumeError(std::move(E));
- auto Version = findDefaultVersion(std::string(1, Baseline));
+ auto Version = findDefaultVersion(StringRef(&Baseline, 1));
Major = Version->Major;
Minor = Version->Minor;
}
- ISAInfo->addExtension(std::string(1, Baseline), Major, Minor);
+ ISAInfo->addExtension(StringRef(&Baseline, 1), Major, Minor);
}
// Consume the base ISA version number and any '_' between rvxxx and the
unsigned Major, Minor, ConsumeLength;
if (std::next(I) != E)
Next = std::string(std::next(I), E);
- if (auto E = getExtensionVersion(std::string(1, C), Next, Major, Minor,
+ if (auto E = getExtensionVersion(StringRef(&C, 1), Next, Major, Minor,
ConsumeLength, EnableExperimentalExtension,
ExperimentalExtensionVersionCheck)) {
if (IgnoreUnknown) {
"unsupported standard user-level extension '%c'",
C);
}
- ISAInfo->addExtension(std::string(1, C), Major, Minor);
+ ISAInfo->addExtension(StringRef(&C, 1), Major, Minor);
// Consume full extension name and version, including any optional '_'
// between this extension and the next