aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ProfileData/MemProfTest.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2024-12-05 09:54:06 +0000
committerFlorian Hahn <flo@fhahn.com>2024-12-05 09:54:07 +0000
commit0772a0bd29afa33520abf1c5a8bae09a718954b2 (patch)
tree9594a56f05d7cae4da09519c60b47293b6732837 /llvm/unittests/ProfileData/MemProfTest.cpp
parent487a070bebdc1252b83e45f8990704b31c6264f1 (diff)
downloadllvm-0772a0bd29afa33520abf1c5a8bae09a718954b2.zip
llvm-0772a0bd29afa33520abf1c5a8bae09a718954b2.tar.gz
llvm-0772a0bd29afa33520abf1c5a8bae09a718954b2.tar.bz2
Revert "[memprof] Update YAML traits for writer purposes (#118720)"
This reverts commit 7b8cf147addf7d3fb4630475c40153226f5fdbd0. Breaks building on macOS https://lab.llvm.org/buildbot/#/builders/190/builds/10737 https://lab.llvm.org/buildbot/#/builders/23/builds/5491 https://green.lab.llvm.org/job/llvm.org/job/clang-stage1-cmake-RA-incremental/6076/
Diffstat (limited to 'llvm/unittests/ProfileData/MemProfTest.cpp')
-rw-r--r--llvm/unittests/ProfileData/MemProfTest.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/llvm/unittests/ProfileData/MemProfTest.cpp b/llvm/unittests/ProfileData/MemProfTest.cpp
index 99f95dd..3ac64dc 100644
--- a/llvm/unittests/ProfileData/MemProfTest.cpp
+++ b/llvm/unittests/ProfileData/MemProfTest.cpp
@@ -807,40 +807,4 @@ HeapProfileRecords:
EXPECT_THAT(Record.CallSiteIds,
ElementsAre(hashCallStack(CS3), hashCallStack(CS4)));
}
-
-template <typename T> std::string serializeInYAML(T &Val) {
- std::string Out;
- llvm::raw_string_ostream OS(Out);
- llvm::yaml::Output Yout(OS);
- Yout << Val;
- return Out;
-}
-
-TEST(MemProf, YAMLWriterFrame) {
- Frame F(11, 22, 33, true);
-
- std::string Out = serializeInYAML(F);
- EXPECT_EQ(Out, R"YAML(---
-{ Function: 11, LineOffset: 22, Column: 33, Inline: true }
-...
-)YAML");
-}
-
-TEST(MemProf, YAMLWriterMIB) {
- MemInfoBlock MIB;
- MIB.AllocCount = 111;
- MIB.TotalSize = 222;
- MIB.TotalLifetime = 333;
- MIB.TotalLifetimeAccessDensity = 444;
- PortableMemInfoBlock PMIB(MIB, llvm::memprof::getHotColdSchema());
-
- std::string Out = serializeInYAML(PMIB);
- EXPECT_EQ(Out, R"YAML(---
-AllocCount: 111
-TotalSize: 222
-TotalLifetime: 333
-TotalLifetimeAccessDensity: 444
-...
-)YAML");
-}
} // namespace