Skip to content

Commit 85a1ebf

Browse files
author
git apple-llvm automerger
committed
Merge commit 'e732bc3a11d7' from apple/master into swift/master-next
2 parents 8f075d1 + e732bc3 commit 85a1ebf

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

llvm/include/llvm/Support/BinaryStreamArray.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,17 @@ class VarStreamArray {
133133
Extractor &getExtractor() { return E; }
134134

135135
BinaryStreamRef getUnderlyingStream() const { return Stream; }
136-
void setUnderlyingStream(BinaryStreamRef S, uint32_t Skew = 0) {
137-
Stream = S;
138-
this->Skew = Skew;
136+
void setUnderlyingStream(BinaryStreamRef NewStream, uint32_t NewSkew = 0) {
137+
Stream = NewStream;
138+
Skew = NewSkew;
139139
}
140140

141141
void drop_front() { Skew += begin()->length(); }
142142

143143
private:
144144
BinaryStreamRef Stream;
145145
Extractor E;
146-
uint32_t Skew;
146+
uint32_t Skew = 0;
147147
};
148148

149149
template <typename ValueType, typename Extractor>

llvm/include/llvm/Support/BinaryStreamReader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@ class BinaryStreamReader {
148148
/// returns an appropriate error code.
149149
Error readStreamRef(BinaryStreamRef &Ref, uint32_t Length);
150150

151-
/// Read \p Length bytes from the underlying stream into \p Stream. This is
151+
/// Read \p Length bytes from the underlying stream into \p Ref. This is
152152
/// equivalent to calling getUnderlyingStream().slice(Offset, Length).
153153
/// Updates the stream's offset to point after the newly read object. Never
154154
/// causes a copy.
155155
///
156156
/// \returns a success error code if the data was successfully read, otherwise
157157
/// returns an appropriate error code.
158-
Error readSubstream(BinarySubstreamRef &Stream, uint32_t Size);
158+
Error readSubstream(BinarySubstreamRef &Ref, uint32_t Length);
159159

160160
/// Get a pointer to an object of type T from the underlying stream, as if by
161161
/// memcpy, and store the result into \p Dest. It is up to the caller to

llvm/include/llvm/Support/BinaryStreamRef.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class BinaryStreamRef
198198
};
199199

200200
struct BinarySubstreamRef {
201-
uint32_t Offset; // Offset in the parent stream
201+
uint32_t Offset = 0; // Offset in the parent stream
202202
BinaryStreamRef StreamData; // Stream Data
203203

204204
BinarySubstreamRef slice(uint32_t Off, uint32_t Size) const {
@@ -211,8 +211,8 @@ struct BinarySubstreamRef {
211211
BinarySubstreamRef keep_front(uint32_t N) const { return slice(0, N); }
212212

213213
std::pair<BinarySubstreamRef, BinarySubstreamRef>
214-
split(uint32_t Offset) const {
215-
return std::make_pair(keep_front(Offset), drop_front(Offset));
214+
split(uint32_t Off) const {
215+
return std::make_pair(keep_front(Off), drop_front(Off));
216216
}
217217

218218
uint32_t size() const { return StreamData.getLength(); }

llvm/lib/Support/BinaryStreamReader.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ Error BinaryStreamReader::readStreamRef(BinaryStreamRef &Ref, uint32_t Length) {
139139
return Error::success();
140140
}
141141

142-
Error BinaryStreamReader::readSubstream(BinarySubstreamRef &Stream,
143-
uint32_t Size) {
144-
Stream.Offset = getOffset();
145-
return readStreamRef(Stream.StreamData, Size);
142+
Error BinaryStreamReader::readSubstream(BinarySubstreamRef &Ref,
143+
uint32_t Length) {
144+
Ref.Offset = getOffset();
145+
return readStreamRef(Ref.StreamData, Length);
146146
}
147147

148148
Error BinaryStreamReader::skip(uint32_t Amount) {

0 commit comments

Comments
 (0)