1 //===- 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 22 namespace llvm { 23 namespace xray { 24 25 /// Convenience function for loading the file header given a data extractor at a 26 /// specified offset. 27 Expected<XRayFileHeader> readBinaryFormatHeader(DataExtractor &HeaderExtractor, 28 uint32_t &OffsetPtr); 29 30 } // namespace xray 31 } // namespace llvm 32 33 #endif // LLVM_LIB_XRAY_FILEHEADERREADER_H_ 34