Files
archived-llvm/include/llvm/XRay/FileHeaderReader.h
Dean Michael Berris b180171289 [XRay] Refactor file header reading (NFC)
Summary:
This patch moves out the definition of the XRay log file header from
binary logs into its own header and implementation file.

This is one part of the refactoring being done in D50441.

Reviewers: eizan

Subscribers: mgorny, hiraditya, llvm-commits

Differential Revision: https://reviews.llvm.org/D51086

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340389 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-22 07:37:55 +00:00

34 lines
1.1 KiB
C++

//===- FileHeaderReader.h - XRay Trace File Header Reading Function -------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file declares functions that can load an XRay log header from various
// sources.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIB_XRAY_FILEHEADERREADER_H_
#define LLVM_LIB_XRAY_FILEHEADERREADER_H_
#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,
uint32_t &OffsetPtr);
} // namespace xray
} // namespace llvm
#endif // LLVM_LIB_XRAY_FILEHEADERREADER_H_