blob: 3b8809bdbb3426446a4cf7a01c0e44234ce73475 [file] [log] [blame]
Andrew Scull0372a572018-11-16 15:47:06 +00001//===- FileHeaderReader.h - XRay Trace File Header Reading Function -------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file declares functions that can load an XRay log header from various
11// sources.
12//
13//===----------------------------------------------------------------------===//
14#ifndef LLVM_LIB_XRAY_FILEHEADERREADER_H_
15#define LLVM_LIB_XRAY_FILEHEADERREADER_H_
16
17#include "llvm/Support/DataExtractor.h"
18#include "llvm/Support/Error.h"
19#include "llvm/XRay/XRayRecord.h"
20#include <cstdint>
21
22namespace llvm {
23namespace xray {
24
25/// Convenience function for loading the file header given a data extractor at a
26/// specified offset.
27Expected<XRayFileHeader> readBinaryFormatHeader(DataExtractor &HeaderExtractor,
28 uint32_t &OffsetPtr);
29
30} // namespace xray
31} // namespace llvm
32
33#endif // LLVM_LIB_XRAY_FILEHEADERREADER_H_