mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-18 18:42:46 +02:00
[llvm-cov] Clean up an awkward capture-by-reference (NFC)
Writing `for (StringRef &SourceFile : ...)` is strange to begin with. Subsequently capturing "SourceFile" by reference is even stranger. Just copy the StringRef, since that's cheap to do. llvm-svn: 275515
This commit is contained in:
parent
493ce5ef6c
commit
fe8fff3fe2
@ -551,8 +551,8 @@ int CodeCoverageTool::show(int argc, const char **argv,
|
||||
ThreadCount = std::thread::hardware_concurrency();
|
||||
ThreadPool Pool(ThreadCount);
|
||||
|
||||
for (StringRef &SourceFile : SourceFiles) {
|
||||
Pool.async([this, &SourceFile, &Coverage, &Printer, ShowFilenames] {
|
||||
for (StringRef SourceFile : SourceFiles) {
|
||||
Pool.async([this, SourceFile, &Coverage, &Printer, ShowFilenames] {
|
||||
auto View = createSourceFileView(SourceFile, *Coverage);
|
||||
if (!View) {
|
||||
deferWarning("The file '" + SourceFile.str() + "' isn't covered.");
|
||||
|
Loading…
Reference in New Issue
Block a user