//===- TypeIndex.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_CODEVIEW_TYPEINDEX_H #define LLVM_DEBUGINFO_CODEVIEW_TYPEINDEX_H #include "llvm/ADT/DenseMapInfo.h" #include "llvm/Support/Endian.h" #include <cassert> #include <cinttypes> namespace llvm { class ScopedPrinter; class StringRef; namespace codeview { class TypeCollection; enum class SimpleTypeKind : uint32_t { … }; enum class SimpleTypeMode : uint32_t { … }; /// A 32-bit type reference. Types are indexed by their order of appearance in /// .debug$T plus 0x1000. Type indices less than 0x1000 are "simple" types, /// composed of a SimpleTypeMode byte followed by a SimpleTypeKind byte. class TypeIndex { … }; // Used for pseudo-indexing an array of type records. An array of such records // sorted by TypeIndex can allow log(N) lookups even though such a type record // stream does not provide random access. struct TypeIndexOffset { … }; void printTypeIndex(ScopedPrinter &Printer, StringRef FieldName, TypeIndex TI, TypeCollection &Types); } template <> struct DenseMapInfo<codeview::TypeIndex> { … }; } // namespace llvm #endif