[llvm-profdata] Add check for text profile formats and improve error reporting (2nd...
[oota-llvm.git] / include / llvm / ProfileData / SampleProfReader.h
index 2f404be50e6ae699ec4a70462ddb2776dfb7042d..1fb2cf6e0ca4b9b3a2f36a6b91180aa0e3b265c6 100644 (file)
@@ -292,6 +292,9 @@ public:
 
   /// \brief Read sample profiles from the associated file.
   std::error_code read() override;
+
+  /// \brief Return true if \p Buffer is in the format supported by this class.
+  static bool hasFormat(const MemoryBuffer &Buffer);
 };
 
 class SampleProfileReaderBinary : public SampleProfileReader {