diff options
| author | Mehdi Amini <mehdi.amini@apple.com> | 2015-09-09 20:35:15 +0000 |
|---|---|---|
| committer | Mehdi Amini <mehdi.amini@apple.com> | 2015-09-09 20:35:15 +0000 |
| commit | c9a85abc6cde98dae0f81e69c7d49d5f71caa572 (patch) | |
| tree | cc6f1d073ada9c8a5a79bf06224f86013ddf42b0 /llvm | |
| parent | 778562fc78790402ec57bbd14a013a10c978a1cd (diff) | |
| download | bcm5719-llvm-c9a85abc6cde98dae0f81e69c7d49d5f71caa572.tar.gz bcm5719-llvm-c9a85abc6cde98dae0f81e69c7d49d5f71caa572.zip | |
Revert "Bitcode Writer: EmitRecordWith* takes an ArrayRef instead of a SmallVector (NFC)"
This reverts commit r247178.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247182
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/Bitcode/BitstreamWriter.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/llvm/include/llvm/Bitcode/BitstreamWriter.h b/llvm/include/llvm/Bitcode/BitstreamWriter.h index 076ebd63d6c..9f23023a141 100644 --- a/llvm/include/llvm/Bitcode/BitstreamWriter.h +++ b/llvm/include/llvm/Bitcode/BitstreamWriter.h @@ -15,7 +15,6 @@ #ifndef LLVM_BITCODE_BITSTREAMWRITER_H #define LLVM_BITCODE_BITSTREAMWRITER_H -#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/Bitcode/BitCodes.h" @@ -287,8 +286,8 @@ private: /// emission code. If BlobData is non-null, then it specifies an array of /// data that should be emitted as part of the Blob or Array operand that is /// known to exist at the end of the record. - template <typename uintty> - void EmitRecordWithAbbrevImpl(unsigned Abbrev, const ArrayRef<uintty> &Vals, + template<typename uintty> + void EmitRecordWithAbbrevImpl(unsigned Abbrev, SmallVectorImpl<uintty> &Vals, StringRef Blob) { const char *BlobData = Blob.data(); unsigned BlobLen = (unsigned) Blob.size(); @@ -399,14 +398,14 @@ public: // Insert the code into Vals to treat it uniformly. Vals.insert(Vals.begin(), Code); - EmitRecordWithAbbrev(Abbrev, makeArrayRef(Vals)); + EmitRecordWithAbbrev(Abbrev, Vals); } /// EmitRecordWithAbbrev - Emit a record with the specified abbreviation. /// Unlike EmitRecord, the code for the record should be included in Vals as /// the first entry. - template <typename uintty> - void EmitRecordWithAbbrev(unsigned Abbrev, const ArrayRef<uintty> &Vals) { + template<typename uintty> + void EmitRecordWithAbbrev(unsigned Abbrev, SmallVectorImpl<uintty> &Vals) { EmitRecordWithAbbrevImpl(Abbrev, Vals, StringRef()); } @@ -415,27 +414,27 @@ public: /// specified by the pointer and length specified at the end. In contrast to /// EmitRecord, this routine expects that the first entry in Vals is the code /// of the record. - template <typename uintty> - void EmitRecordWithBlob(unsigned Abbrev, const ArrayRef<uintty> &Vals, + template<typename uintty> + void EmitRecordWithBlob(unsigned Abbrev, SmallVectorImpl<uintty> &Vals, StringRef Blob) { EmitRecordWithAbbrevImpl(Abbrev, Vals, Blob); } - template <typename uintty> - void EmitRecordWithBlob(unsigned Abbrev, const ArrayRef<uintty> &Vals, + template<typename uintty> + void EmitRecordWithBlob(unsigned Abbrev, SmallVectorImpl<uintty> &Vals, const char *BlobData, unsigned BlobLen) { return EmitRecordWithAbbrevImpl(Abbrev, Vals, StringRef(BlobData, BlobLen)); } /// EmitRecordWithArray - Just like EmitRecordWithBlob, works with records /// that end with an array. - template <typename uintty> - void EmitRecordWithArray(unsigned Abbrev, const ArrayRef<uintty> &Vals, - StringRef Array) { + template<typename uintty> + void EmitRecordWithArray(unsigned Abbrev, SmallVectorImpl<uintty> &Vals, + StringRef Array) { EmitRecordWithAbbrevImpl(Abbrev, Vals, Array); } - template <typename uintty> - void EmitRecordWithArray(unsigned Abbrev, const ArrayRef<uintty> &Vals, - const char *ArrayData, unsigned ArrayLen) { + template<typename uintty> + void EmitRecordWithArray(unsigned Abbrev, SmallVectorImpl<uintty> &Vals, + const char *ArrayData, unsigned ArrayLen) { return EmitRecordWithAbbrevImpl(Abbrev, Vals, StringRef(ArrayData, ArrayLen)); } |

