[llvm] r356901 - MinidumpYAML.cpp: Fix some code standard violations missed during review
Pavel Labath via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 07:45:32 PDT 2019
Author: labath
Date: Mon Mar 25 07:45:31 2019
New Revision: 356901
URL: http://llvm.org/viewvc/llvm-project?rev=356901&view=rev
Log:
MinidumpYAML.cpp: Fix some code standard violations missed during review
functions should begin with lower case letters. NFC.
Modified:
llvm/trunk/lib/ObjectYAML/MinidumpYAML.cpp
Modified: llvm/trunk/lib/ObjectYAML/MinidumpYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ObjectYAML/MinidumpYAML.cpp?rev=356901&r1=356900&r2=356901&view=diff
==============================================================================
--- llvm/trunk/lib/ObjectYAML/MinidumpYAML.cpp (original)
+++ llvm/trunk/lib/ObjectYAML/MinidumpYAML.cpp Mon Mar 25 07:45:31 2019
@@ -17,7 +17,7 @@ class BlobAllocator {
public:
size_t tell() const { return NextOffset; }
- size_t AllocateCallback(size_t Size,
+ size_t allocateCallback(size_t Size,
std::function<void(raw_ostream &)> Callback) {
size_t Offset = NextOffset;
NextOffset += Size;
@@ -25,18 +25,18 @@ public:
return Offset;
}
- size_t AllocateBytes(ArrayRef<uint8_t> Data) {
- return AllocateCallback(
+ size_t allocateBytes(ArrayRef<uint8_t> Data) {
+ return allocateCallback(
Data.size(), [Data](raw_ostream &OS) { OS << toStringRef(Data); });
}
- template <typename T> size_t AllocateArray(ArrayRef<T> Data) {
- return AllocateBytes({reinterpret_cast<const uint8_t *>(Data.data()),
+ template <typename T> size_t allocateArray(ArrayRef<T> Data) {
+ return allocateBytes({reinterpret_cast<const uint8_t *>(Data.data()),
sizeof(T) * Data.size()});
}
- template <typename T> size_t AllocateObject(const T &Data) {
- return AllocateArray(makeArrayRef(Data));
+ template <typename T> size_t allocateObject(const T &Data) {
+ return allocateArray(makeArrayRef(Data));
}
void writeTo(raw_ostream &OS) const;
@@ -340,7 +340,7 @@ static Directory layout(BlobAllocator &F
switch (S.Kind) {
case Stream::StreamKind::RawContent: {
RawContentStream &Raw = cast<RawContentStream>(S);
- File.AllocateCallback(Raw.Size, [&Raw](raw_ostream &OS) {
+ File.allocateCallback(Raw.Size, [&Raw](raw_ostream &OS) {
Raw.Content.writeAsBinary(OS);
assert(Raw.Content.binary_size() <= Raw.Size);
OS << std::string(Raw.Size - Raw.Content.binary_size(), '\0');
@@ -348,10 +348,10 @@ static Directory layout(BlobAllocator &F
break;
}
case Stream::StreamKind::SystemInfo:
- File.AllocateObject(cast<SystemInfoStream>(S).Info);
+ File.allocateObject(cast<SystemInfoStream>(S).Info);
break;
case Stream::StreamKind::TextContent:
- File.AllocateArray(arrayRefFromStringRef(cast<TextContentStream>(S).Text));
+ File.allocateArray(arrayRefFromStringRef(cast<TextContentStream>(S).Text));
break;
}
Result.Location.DataSize = File.tell() - Result.Location.RVA;
@@ -360,11 +360,11 @@ static Directory layout(BlobAllocator &F
void MinidumpYAML::writeAsBinary(Object &Obj, raw_ostream &OS) {
BlobAllocator File;
- File.AllocateObject(Obj.Header);
+ File.allocateObject(Obj.Header);
std::vector<Directory> StreamDirectory(Obj.Streams.size());
Obj.Header.StreamDirectoryRVA =
- File.AllocateArray(makeArrayRef(StreamDirectory));
+ File.allocateArray(makeArrayRef(StreamDirectory));
Obj.Header.NumberOfStreams = StreamDirectory.size();
for (auto &Stream : enumerate(Obj.Streams))
More information about the llvm-commits
mailing list