[llvm] c476abf - [BitcodeReader] Simplify code. NFCI.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Thu May 21 07:03:56 PDT 2020
Author: Benjamin Kramer
Date: 2020-05-21T16:03:09+02:00
New Revision: c476abfd37c0578224c14fd90522fb825a0316fb
URL: https://github.com/llvm/llvm-project/commit/c476abfd37c0578224c14fd90522fb825a0316fb
DIFF: https://github.com/llvm/llvm-project/commit/c476abfd37c0578224c14fd90522fb825a0316fb.diff
LOG: [BitcodeReader] Simplify code. NFCI.
Added:
Modified:
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index e95d7b1ee8a9..4bad2b55bf94 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -152,8 +152,7 @@ static bool convertToString(ArrayRef<uint64_t> Record, unsigned Idx,
if (Idx > Record.size())
return true;
- for (unsigned i = Idx, e = Record.size(); i != e; ++i)
- Result += (char)Record[i];
+ Result.append(Record.begin() + Idx, Record.end());
return false;
}
More information about the llvm-commits
mailing list