[llvm] 5bf45ee - BitcodeReader::popValue - pass SmallVectorImpl<> as const reference. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 30 07:33:40 PDT 2020
Author: Simon Pilgrim
Date: 2020-10-30T14:33:19Z
New Revision: 5bf45ee1568e846291565ef6a16eca53e60b39ec
URL: https://github.com/llvm/llvm-project/commit/5bf45ee1568e846291565ef6a16eca53e60b39ec
DIFF: https://github.com/llvm/llvm-project/commit/5bf45ee1568e846291565ef6a16eca53e60b39ec.diff
LOG: BitcodeReader::popValue - pass SmallVectorImpl<> as const reference. NFCI.
Fixes cppcheck warning.
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 a99d6baa8d9d..eefb1877334f 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -676,7 +676,7 @@ class BitcodeReader : public BitcodeReaderBase, public GVMaterializer {
/// Read a value out of the specified record from slot 'Slot'. Increment Slot
/// past the number of slots used by the value in the record. Return true if
/// there is an error.
- bool popValue(SmallVectorImpl<uint64_t> &Record, unsigned &Slot,
+ bool popValue(const SmallVectorImpl<uint64_t> &Record, unsigned &Slot,
unsigned InstNum, Type *Ty, Value *&ResVal) {
if (getValue(Record, Slot, InstNum, Ty, ResVal))
return true;
More information about the llvm-commits
mailing list