@@ -383,7 +383,7 @@ loadAllFilesForIndex(const ModuleSummaryIndex &Index) {
383
383
384
384
for (auto &ModPath : Index.modulePaths ()) {
385
385
const auto &Filename = ModPath.first ();
386
- auto CurrentActivity = " loading file '" + Filename + " '" ;
386
+ std::string CurrentActivity = ( " loading file '" + Filename + " '" ). str () ;
387
387
auto InputOrErr = MemoryBuffer::getFile (Filename);
388
388
error (InputOrErr, " error " + CurrentActivity);
389
389
InputBuffers.push_back (std::move (*InputOrErr));
@@ -475,7 +475,7 @@ class ThinLTOProcessing {
475
475
std::vector<std::unique_ptr<MemoryBuffer>> InputBuffers;
476
476
for (unsigned i = 0 ; i < InputFilenames.size (); ++i) {
477
477
auto &Filename = InputFilenames[i];
478
- StringRef CurrentActivity = " loading file '" + Filename + " '" ;
478
+ std::string CurrentActivity = " loading file '" + Filename + " '" ;
479
479
auto InputOrErr = MemoryBuffer::getFile (Filename);
480
480
error (InputOrErr, " error " + CurrentActivity);
481
481
InputBuffers.push_back (std::move (*InputOrErr));
@@ -710,7 +710,7 @@ class ThinLTOProcessing {
710
710
std::vector<std::unique_ptr<MemoryBuffer>> InputBuffers;
711
711
for (unsigned i = 0 ; i < InputFilenames.size (); ++i) {
712
712
auto &Filename = InputFilenames[i];
713
- StringRef CurrentActivity = " loading file '" + Filename + " '" ;
713
+ std::string CurrentActivity = " loading file '" + Filename + " '" ;
714
714
auto InputOrErr = MemoryBuffer::getFile (Filename);
715
715
error (InputOrErr, " error " + CurrentActivity);
716
716
InputBuffers.push_back (std::move (*InputOrErr));
0 commit comments