diff options
author | Craig Topper <craig.topper@gmail.com> | 2013-07-11 16:22:38 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2013-07-11 16:22:38 +0000 |
commit | 9e639e8fd95488cb4c8ef2f7f3a41919acb29ac4 (patch) | |
tree | f4aa87a04af2f69d097f9c9ed386fa833cabac39 /lib/Bitcode/Reader | |
parent | 73480481f4ebe05e0b0f7d5eabd8f8f34b6823f1 (diff) | |
download | llvm-9e639e8fd95488cb4c8ef2f7f3a41919acb29ac4.tar.gz llvm-9e639e8fd95488cb4c8ef2f7f3a41919acb29ac4.tar.bz2 llvm-9e639e8fd95488cb4c8ef2f7f3a41919acb29ac4.tar.xz |
Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186098 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader')
-rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.h b/lib/Bitcode/Reader/BitcodeReader.h index 28674eb14e..e4de4ab7c7 100644 --- a/lib/Bitcode/Reader/BitcodeReader.h +++ b/lib/Bitcode/Reader/BitcodeReader.h @@ -258,7 +258,7 @@ private: /// getValueTypePair - Read a value/type pair out of the specified record from /// slot 'Slot'. Increment Slot past the number of slots used in the record. /// Return true on failure. - bool getValueTypePair(SmallVector<uint64_t, 64> &Record, unsigned &Slot, + bool getValueTypePair(SmallVectorImpl<uint64_t> &Record, unsigned &Slot, unsigned InstNum, Value *&ResVal) { if (Slot == Record.size()) return true; unsigned ValNo = (unsigned)Record[Slot++]; @@ -282,7 +282,7 @@ private: /// popValue - 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(SmallVector<uint64_t, 64> &Record, unsigned &Slot, + bool popValue(SmallVectorImpl<uint64_t> &Record, unsigned &Slot, unsigned InstNum, Type *Ty, Value *&ResVal) { if (getValue(Record, Slot, InstNum, Ty, ResVal)) return true; @@ -292,7 +292,7 @@ private: } /// getValue -- Like popValue, but does not increment the Slot number. - bool getValue(SmallVector<uint64_t, 64> &Record, unsigned Slot, + bool getValue(SmallVectorImpl<uint64_t> &Record, unsigned Slot, unsigned InstNum, Type *Ty, Value *&ResVal) { ResVal = getValue(Record, Slot, InstNum, Ty); return ResVal == 0; @@ -300,7 +300,7 @@ private: /// getValue -- Version of getValue that returns ResVal directly, /// or 0 if there is an error. - Value *getValue(SmallVector<uint64_t, 64> &Record, unsigned Slot, + Value *getValue(SmallVectorImpl<uint64_t> &Record, unsigned Slot, unsigned InstNum, Type *Ty) { if (Slot == Record.size()) return 0; unsigned ValNo = (unsigned)Record[Slot]; @@ -311,7 +311,7 @@ private: } /// getValueSigned -- Like getValue, but decodes signed VBRs. - Value *getValueSigned(SmallVector<uint64_t, 64> &Record, unsigned Slot, + Value *getValueSigned(SmallVectorImpl<uint64_t> &Record, unsigned Slot, unsigned InstNum, Type *Ty) { if (Slot == Record.size()) return 0; unsigned ValNo = (unsigned)decodeSignRotatedValue(Record[Slot]); |