FileHeaderReader.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. //===- FileHeaderReader.h - XRay Trace File Header Reading Function -------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file declares functions that can load an XRay log header from various
  10. // sources.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_XRAY_FILEHEADERREADER_H
  14. #define LLVM_XRAY_FILEHEADERREADER_H
  15. #include "llvm/Support/DataExtractor.h"
  16. #include "llvm/Support/Error.h"
  17. #include "llvm/XRay/XRayRecord.h"
  18. #include <cstdint>
  19. namespace llvm {
  20. namespace xray {
  21. /// Convenience function for loading the file header given a data extractor at a
  22. /// specified offset.
  23. Expected<XRayFileHeader> readBinaryFormatHeader(DataExtractor &HeaderExtractor,
  24. uint64_t &OffsetPtr);
  25. } // namespace xray
  26. } // namespace llvm
  27. #endif // LLVM_XRAY_FILEHEADERREADER_H