forked from OSchip/llvm-project
Explicitly convert StringRef to std::string for compatibility with libstdc++ 5.4.0
For some reason, the user-defined implicit conversion from StringRef to std::string is not invoked by std::map::emplace in libstdc++ 5.4.0, even though it works fine on modern systems.
This commit is contained in:
parent
90bbf79c7b
commit
156b1e6ba8
|
@ -521,7 +521,7 @@ void CSProfileConverter::convertProfiles(CSProfileConverter::FrameNode &Node) {
|
||||||
if (NodeProfile) {
|
if (NodeProfile) {
|
||||||
// Add child profile to the callsite profile map.
|
// Add child profile to the callsite profile map.
|
||||||
auto &SamplesMap = NodeProfile->functionSamplesAt(ChildNode.CallSiteLoc);
|
auto &SamplesMap = NodeProfile->functionSamplesAt(ChildNode.CallSiteLoc);
|
||||||
SamplesMap.emplace(OrigChildContext.getName(), *ChildProfile);
|
SamplesMap.emplace(OrigChildContext.getName().str(), *ChildProfile);
|
||||||
NodeProfile->addTotalSamples(ChildProfile->getTotalSamples());
|
NodeProfile->addTotalSamples(ChildProfile->getTotalSamples());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue