diff options
author | Kazu Hirata <kazu@google.com> | 2024-04-25 10:24:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-25 10:24:19 -0700 |
commit | f9a0b467dd3da17e9b5d3b50bff624a60dc2950c (patch) | |
tree | e486b6da2d98ca13446b6ae91e8cfee6e58047b5 /llvm/unittests/ProfileData/MemProfTest.cpp | |
parent | 39adc8f423297c5741bb731bb8b1e545d558502c (diff) | |
download | llvm-f9a0b467dd3da17e9b5d3b50bff624a60dc2950c.zip llvm-f9a0b467dd3da17e9b5d3b50bff624a60dc2950c.tar.gz llvm-f9a0b467dd3da17e9b5d3b50bff624a60dc2950c.tar.bz2 |
[memprof] Remove getFullSchema in MemProfTest.cpp (#90072)
This patch removes getFullSchema in MemProfTest.cpp in favor of
llvm::memprof::PortableMemInfoBlock::getFullSchema as they do exactly
the same thing.
Diffstat (limited to 'llvm/unittests/ProfileData/MemProfTest.cpp')
-rw-r--r-- | llvm/unittests/ProfileData/MemProfTest.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/llvm/unittests/ProfileData/MemProfTest.cpp b/llvm/unittests/ProfileData/MemProfTest.cpp index 7e00a80c..5e72b3a 100644 --- a/llvm/unittests/ProfileData/MemProfTest.cpp +++ b/llvm/unittests/ProfileData/MemProfTest.cpp @@ -122,14 +122,6 @@ MATCHER_P4(FrameContains, FunctionName, LineOffset, Column, Inline, "") { return false; } -MemProfSchema getFullSchema() { - MemProfSchema Schema; -#define MIBEntryDef(NameTag, Name, Type) Schema.push_back(Meta::Name); -#include "llvm/ProfileData/MIBEntryDef.inc" -#undef MIBEntryDef - return Schema; -} - TEST(MemProf, FillsValue) { std::unique_ptr<MockSymbolizer> Symbolizer(new MockSymbolizer()); @@ -248,7 +240,7 @@ TEST(MemProf, PortableWrapper) { /*dealloc_timestamp=*/2000, /*alloc_cpu=*/3, /*dealloc_cpu=*/4); - const auto Schema = getFullSchema(); + const auto Schema = llvm::memprof::PortableMemInfoBlock::getFullSchema(); PortableMemInfoBlock WriteBlock(Info); std::string Buffer; @@ -271,7 +263,7 @@ TEST(MemProf, PortableWrapper) { // Version0 and Version1 serialize IndexedMemProfRecord in the same format, so // we share one test. TEST(MemProf, RecordSerializationRoundTripVersion0And1) { - const MemProfSchema Schema = getFullSchema(); + const auto Schema = llvm::memprof::PortableMemInfoBlock::getFullSchema(); MemInfoBlock Info(/*size=*/16, /*access_count=*/7, /*alloc_timestamp=*/1000, /*dealloc_timestamp=*/2000, /*alloc_cpu=*/3, @@ -305,7 +297,7 @@ TEST(MemProf, RecordSerializationRoundTripVersion0And1) { } TEST(MemProf, RecordSerializationRoundTripVerion2) { - const MemProfSchema Schema = getFullSchema(); + const auto Schema = llvm::memprof::PortableMemInfoBlock::getFullSchema(); MemInfoBlock Info(/*size=*/16, /*access_count=*/7, /*alloc_timestamp=*/1000, /*dealloc_timestamp=*/2000, /*alloc_cpu=*/3, |