<div dir="ltr">It's helpful to mention when reverting a patch why it was reverted (same goes for the Clang revert) - so someone else doesn't come along later and hit the same problem.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 9, 2015 at 1:35 PM, Mehdi Amini via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: mehdi_amini<br>
Date: Wed Sep 9 15:35:15 2015<br>
New Revision: 247182<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=247182&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=247182&view=rev</a><br>
Log:<br>
Revert "Bitcode Writer: EmitRecordWith* takes an ArrayRef instead of a SmallVector (NFC)"<br>
<br>
This reverts commit r247178.<br>
<br>
From: Mehdi Amini <<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a>><br>
<br>
Modified:<br>
llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h<br>
<br>
Modified: llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h?rev=247182&r1=247181&r2=247182&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h?rev=247182&r1=247181&r2=247182&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h (original)<br>
+++ llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h Wed Sep 9 15:35:15 2015<br>
@@ -15,7 +15,6 @@<br>
#ifndef LLVM_BITCODE_BITSTREAMWRITER_H<br>
#define LLVM_BITCODE_BITSTREAMWRITER_H<br>
<br>
-#include "llvm/ADT/ArrayRef.h"<br>
#include "llvm/ADT/SmallVector.h"<br>
#include "llvm/ADT/StringRef.h"<br>
#include "llvm/Bitcode/BitCodes.h"<br>
@@ -287,8 +286,8 @@ private:<br>
/// emission code. If BlobData is non-null, then it specifies an array of<br>
/// data that should be emitted as part of the Blob or Array operand that is<br>
/// known to exist at the end of the record.<br>
- template <typename uintty><br>
- void EmitRecordWithAbbrevImpl(unsigned Abbrev, const ArrayRef<uintty> &Vals,<br>
+ template<typename uintty><br>
+ void EmitRecordWithAbbrevImpl(unsigned Abbrev, SmallVectorImpl<uintty> &Vals,<br>
StringRef Blob) {<br>
const char *BlobData = Blob.data();<br>
unsigned BlobLen = (unsigned) Blob.size();<br>
@@ -399,14 +398,14 @@ public:<br>
// Insert the code into Vals to treat it uniformly.<br>
Vals.insert(Vals.begin(), Code);<br>
<br>
- EmitRecordWithAbbrev(Abbrev, makeArrayRef(Vals));<br>
+ EmitRecordWithAbbrev(Abbrev, Vals);<br>
}<br>
<br>
/// EmitRecordWithAbbrev - Emit a record with the specified abbreviation.<br>
/// Unlike EmitRecord, the code for the record should be included in Vals as<br>
/// the first entry.<br>
- template <typename uintty><br>
- void EmitRecordWithAbbrev(unsigned Abbrev, const ArrayRef<uintty> &Vals) {<br>
+ template<typename uintty><br>
+ void EmitRecordWithAbbrev(unsigned Abbrev, SmallVectorImpl<uintty> &Vals) {<br>
EmitRecordWithAbbrevImpl(Abbrev, Vals, StringRef());<br>
}<br>
<br>
@@ -415,27 +414,27 @@ public:<br>
/// specified by the pointer and length specified at the end. In contrast to<br>
/// EmitRecord, this routine expects that the first entry in Vals is the code<br>
/// of the record.<br>
- template <typename uintty><br>
- void EmitRecordWithBlob(unsigned Abbrev, const ArrayRef<uintty> &Vals,<br>
+ template<typename uintty><br>
+ void EmitRecordWithBlob(unsigned Abbrev, SmallVectorImpl<uintty> &Vals,<br>
StringRef Blob) {<br>
EmitRecordWithAbbrevImpl(Abbrev, Vals, Blob);<br>
}<br>
- template <typename uintty><br>
- void EmitRecordWithBlob(unsigned Abbrev, const ArrayRef<uintty> &Vals,<br>
+ template<typename uintty><br>
+ void EmitRecordWithBlob(unsigned Abbrev, SmallVectorImpl<uintty> &Vals,<br>
const char *BlobData, unsigned BlobLen) {<br>
return EmitRecordWithAbbrevImpl(Abbrev, Vals, StringRef(BlobData, BlobLen));<br>
}<br>
<br>
/// EmitRecordWithArray - Just like EmitRecordWithBlob, works with records<br>
/// that end with an array.<br>
- template <typename uintty><br>
- void EmitRecordWithArray(unsigned Abbrev, const ArrayRef<uintty> &Vals,<br>
- StringRef Array) {<br>
+ template<typename uintty><br>
+ void EmitRecordWithArray(unsigned Abbrev, SmallVectorImpl<uintty> &Vals,<br>
+ StringRef Array) {<br>
EmitRecordWithAbbrevImpl(Abbrev, Vals, Array);<br>
}<br>
- template <typename uintty><br>
- void EmitRecordWithArray(unsigned Abbrev, const ArrayRef<uintty> &Vals,<br>
- const char *ArrayData, unsigned ArrayLen) {<br>
+ template<typename uintty><br>
+ void EmitRecordWithArray(unsigned Abbrev, SmallVectorImpl<uintty> &Vals,<br>
+ const char *ArrayData, unsigned ArrayLen) {<br>
return EmitRecordWithAbbrevImpl(Abbrev, Vals, StringRef(ArrayData,<br>
ArrayLen));<br>
}<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>