[llvm] [memprof] Add YAML read/write support to llvm-profdata (PR #118915)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 08:19:11 PST 2024


================
@@ -213,6 +213,21 @@ class RawMemProfReader final : public MemProfReader {
 class YAMLMemProfReader final : public MemProfReader {
 public:
   YAMLMemProfReader() = default;
+
+  // Return true if the \p DataBuffer starts with magic bytes indicating it is
+  // a raw binary memprof profile.
+  static bool hasFormat(const MemoryBuffer &DataBuffer);
+  // Return true if the file at \p Path starts with magic bytes indicating it is
+  // a raw binary memprof profile.
+  static bool hasFormat(const StringRef Path);
+
+  // Create a RawMemProfReader after sanity checking the contents of the file at
----------------
teresajohnson wrote:

s/Raw/Yaml/?

https://github.com/llvm/llvm-project/pull/118915


More information about the llvm-commits mailing list