FileHeaderReader.h 1.3 KB

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