2018-08-22 09:37:55 +02:00
|
|
|
//===- FileHeaderReader.h - XRay Trace File Header Reading Function -------===//
|
|
|
|
//
|
2019-01-19 09:50:56 +01:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2018-08-22 09:37:55 +02:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file declares functions that can load an XRay log header from various
|
|
|
|
// sources.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2021-02-06 06:02:06 +01:00
|
|
|
#ifndef LLVM_XRAY_FILEHEADERREADER_H
|
|
|
|
#define LLVM_XRAY_FILEHEADERREADER_H
|
2018-08-22 09:37:55 +02:00
|
|
|
|
|
|
|
#include "llvm/Support/DataExtractor.h"
|
|
|
|
#include "llvm/Support/Error.h"
|
|
|
|
#include "llvm/XRay/XRayRecord.h"
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
namespace xray {
|
|
|
|
|
|
|
|
/// Convenience function for loading the file header given a data extractor at a
|
|
|
|
/// specified offset.
|
|
|
|
Expected<XRayFileHeader> readBinaryFormatHeader(DataExtractor &HeaderExtractor,
|
2019-08-06 12:49:40 +02:00
|
|
|
uint64_t &OffsetPtr);
|
2018-08-22 09:37:55 +02:00
|
|
|
|
|
|
|
} // namespace xray
|
|
|
|
} // namespace llvm
|
|
|
|
|
2021-02-06 06:02:06 +01:00
|
|
|
#endif // LLVM_XRAY_FILEHEADERREADER_H
|