Skip to content

Commit

Permalink
[StackMaps] Remove format version from the class name [NFC]
Browse files Browse the repository at this point in the history
Motivation is to reduce silly diffs when we change the format.  For instance, this causes most of D59020 to disappear.

llvm-svn: 358322
  • Loading branch information
preames committed Apr 13, 2019
1 parent 7d46945 commit 377f507
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
17 changes: 9 additions & 8 deletions llvm/include/llvm/Object/StackMapParser.h
Expand Up @@ -19,8 +19,9 @@

namespace llvm {

/// A parser for the latest stackmap format. At the moment, latest=V2.
template <support::endianness Endianness>
class StackMapV2Parser {
class StackMapParser {
public:
template <typename AccessorT>
class AccessorIterator {
Expand Down Expand Up @@ -49,7 +50,7 @@ class StackMapV2Parser {

/// Accessor for function records.
class FunctionAccessor {
friend class StackMapV2Parser;
friend class StackMapParser;

public:
/// Get the function address.
Expand Down Expand Up @@ -81,7 +82,7 @@ class StackMapV2Parser {

/// Accessor for constants.
class ConstantAccessor {
friend class StackMapV2Parser;
friend class StackMapParser;

public:
/// Return the value of this constant.
Expand All @@ -105,7 +106,7 @@ class StackMapV2Parser {

/// Accessor for location records.
class LocationAccessor {
friend class StackMapV2Parser;
friend class StackMapParser;
friend class RecordAccessor;

public:
Expand Down Expand Up @@ -164,7 +165,7 @@ class StackMapV2Parser {

/// Accessor for stackmap live-out fields.
class LiveOutAccessor {
friend class StackMapV2Parser;
friend class StackMapParser;
friend class RecordAccessor;

public:
Expand Down Expand Up @@ -195,7 +196,7 @@ class StackMapV2Parser {

/// Accessor for stackmap records.
class RecordAccessor {
friend class StackMapV2Parser;
friend class StackMapParser;

public:
using location_iterator = AccessorIterator<LocationAccessor>;
Expand Down Expand Up @@ -299,12 +300,12 @@ class StackMapV2Parser {

/// Construct a parser for a version-2 stackmap. StackMap data will be read
/// from the given array.
StackMapV2Parser(ArrayRef<uint8_t> StackMapSection)
StackMapParser(ArrayRef<uint8_t> StackMapSection)
: StackMapSection(StackMapSection) {
ConstantsListOffset = FunctionListOffset + getNumFunctions() * FunctionSize;

assert(StackMapSection[0] == 2 &&
"StackMapV2Parser can only parse version 2 stackmaps");
"StackMapParser can only parse version 2 stackmaps");

unsigned CurrentRecordOffset =
ConstantsListOffset + getNumConstants() * ConstantSize;
Expand Down
4 changes: 2 additions & 2 deletions llvm/tools/llvm-readobj/COFFDumper.cpp
Expand Up @@ -1867,10 +1867,10 @@ void COFFDumper::printStackMap() const {

if (Obj->isLittleEndian())
prettyPrintStackMap(
W, StackMapV2Parser<support::little>(StackMapContentsArray));
W, StackMapParser<support::little>(StackMapContentsArray));
else
prettyPrintStackMap(W,
StackMapV2Parser<support::big>(StackMapContentsArray));
StackMapParser<support::big>(StackMapContentsArray));
}

void COFFDumper::printAddrsig() {
Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/llvm-readobj/ELFDumper.cpp
Expand Up @@ -2407,7 +2407,7 @@ template <class ELFT> void ELFDumper<ELFT>::printStackMap() const {
unwrapOrError(Obj->getSectionContents(StackMapSection));

prettyPrintStackMap(
W, StackMapV2Parser<ELFT::TargetEndianness>(StackMapContentsArray));
W, StackMapParser<ELFT::TargetEndianness>(StackMapContentsArray));
}

template <class ELFT> void ELFDumper<ELFT>::printGroupSections() {
Expand Down
4 changes: 2 additions & 2 deletions llvm/tools/llvm-readobj/MachODumper.cpp
Expand Up @@ -667,10 +667,10 @@ void MachODumper::printStackMap() const {

if (Obj->isLittleEndian())
prettyPrintStackMap(
W, StackMapV2Parser<support::little>(StackMapContentsArray));
W, StackMapParser<support::little>(StackMapContentsArray));
else
prettyPrintStackMap(W,
StackMapV2Parser<support::big>(StackMapContentsArray));
StackMapParser<support::big>(StackMapContentsArray));
}

void MachODumper::printNeededLibraries() {
Expand Down

0 comments on commit 377f507

Please sign in to comment.