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