//===- GsymReader.h ---------------------------------------------*- C++ -*-===// // // 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 // //===----------------------------------------------------------------------===// #ifndef LLVM_DEBUGINFO_GSYM_GSYMREADER_H #define LLVM_DEBUGINFO_GSYM_GSYMREADER_H #include "llvm/ADT/ArrayRef.h" #include "llvm/DebugInfo/GSYM/FileEntry.h" #include "llvm/DebugInfo/GSYM/FunctionInfo.h" #include "llvm/DebugInfo/GSYM/Header.h" #include "llvm/DebugInfo/GSYM/LineEntry.h" #include "llvm/DebugInfo/GSYM/StringTable.h" #include "llvm/Support/DataExtractor.h" #include "llvm/Support/Endian.h" #include "llvm/Support/ErrorOr.h" #include <inttypes.h> #include <memory> #include <stdint.h> #include <vector> namespace llvm { class MemoryBuffer; class raw_ostream; namespace gsym { /// GsymReader is used to read GSYM data from a file or buffer. /// /// This class is optimized for very quick lookups when the endianness matches /// the host system. The Header, address table, address info offsets, and file /// table is designed to be mmap'ed as read only into memory and used without /// any parsing needed. If the endianness doesn't match, we swap these objects /// and tables into GsymReader::SwappedData and then point our header and /// ArrayRefs to this swapped internal data. /// /// GsymReader objects must use one of the static functions to create an /// instance: GsymReader::openFile(...) and GsymReader::copyBuffer(...). class GsymReader { … }; } // namespace gsym } // namespace llvm #endif // LLVM_DEBUGINFO_GSYM_GSYMREADER_H