diff --git a/llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp b/llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp --- a/llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp +++ b/llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp @@ -97,7 +97,7 @@ S.split(BBIndexes, ' '); // Reset current cluster position. CurrentPosition = 0; - for (auto BBIndexStr : BBIndexes) { + for (auto &BBIndexStr : BBIndexes) { unsigned long long BBIndex; if (getAsUnsignedInteger(BBIndexStr, 10, BBIndex)) return invalidProfileError(Twine("Unsigned integer expected: '") +