Skip to content

Commit 64c3773

Browse files
Make StringRef to std::string conversions explicit.
1 parent ee10198 commit 64c3773

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/Serialization/ModuleFileCoreTableInfo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ class ModuleFileSharedCore::DerivativeFunctionConfigTableInfo {
457457
int32_t nameLength = endian::readNext<int32_t, little, unaligned>(data);
458458
StringRef mangledName(reinterpret_cast<const char *>(data), nameLength);
459459
data += nameLength;
460-
result.push_back({mangledName, genSigId});
460+
result.push_back({std::string(mangledName), genSigId});
461461
}
462462
return result;
463463
}

lib/Serialization/Serialization.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -5154,7 +5154,8 @@ void Serializer::writeAST(ModuleOrSourceFile DC) {
51545154
for (auto config : entry.second) {
51555155
std::string paramIndices = config.first.str().str();
51565156
auto genSigID = addGenericSignatureRef(config.second);
5157-
derivativeConfigs[entry.first].push_back({paramIndices, genSigID});
5157+
derivativeConfigs[entry.first].push_back(
5158+
{std::string(paramIndices), genSigID});
51585159
}
51595160
}
51605161
index_block::DerivativeFunctionConfigTableLayout DerivativeConfigTable(Out);

0 commit comments

Comments
 (0)