Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:40

0001 //===- TypeIndexDiscovery.h -------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_DEBUGINFO_CODEVIEW_TYPEINDEXDISCOVERY_H
0010 #define LLVM_DEBUGINFO_CODEVIEW_TYPEINDEXDISCOVERY_H
0011 
0012 #include "llvm/ADT/ArrayRef.h"
0013 #include "llvm/DebugInfo/CodeView/CVRecord.h"
0014 
0015 namespace llvm {
0016 template <typename T> class SmallVectorImpl;
0017 namespace codeview {
0018 class TypeIndex;
0019 enum class TiRefKind { TypeRef, IndexRef };
0020 struct TiReference {
0021   TiRefKind Kind;
0022   uint32_t Offset;
0023   uint32_t Count;
0024 };
0025 
0026 void discoverTypeIndices(ArrayRef<uint8_t> RecordData,
0027                          SmallVectorImpl<TiReference> &Refs);
0028 void discoverTypeIndices(const CVType &Type,
0029                          SmallVectorImpl<TiReference> &Refs);
0030 void discoverTypeIndices(const CVType &Type,
0031                          SmallVectorImpl<TypeIndex> &Indices);
0032 void discoverTypeIndices(ArrayRef<uint8_t> RecordData,
0033                          SmallVectorImpl<TypeIndex> &Indices);
0034 
0035 /// Discover type indices in symbol records. Returns false if this is an unknown
0036 /// record.
0037 bool discoverTypeIndicesInSymbol(const CVSymbol &Symbol,
0038                                  SmallVectorImpl<TiReference> &Refs);
0039 bool discoverTypeIndicesInSymbol(ArrayRef<uint8_t> RecordData,
0040                                  SmallVectorImpl<TiReference> &Refs);
0041 bool discoverTypeIndicesInSymbol(ArrayRef<uint8_t> RecordData,
0042                                  SmallVectorImpl<TypeIndex> &Indices);
0043 }
0044 }
0045 
0046 #endif