|
@@ -316,10 +316,10 @@ bool TargetInfo::initFeatureMap(
|
|
|
llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU,
|
|
|
const std::vector<std::string> &FeatureVec) const {
|
|
|
for (const auto &F : FeatureVec) {
|
|
|
- const char *Name = F.c_str();
|
|
|
+ StringRef Name = F;
|
|
|
// Apply the feature via the target.
|
|
|
bool Enabled = Name[0] == '+';
|
|
|
- setFeatureEnabled(Features, Name + 1, Enabled);
|
|
|
+ setFeatureEnabled(Features, Name.substr(1), Enabled);
|
|
|
}
|
|
|
return true;
|
|
|
}
|