1 //===- TypeIndexDiscovery.h -------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_DEBUGINFO_CODEVIEW_TYPEINDEXDISCOVERY_H
11 #define LLVM_DEBUGINFO_CODEVIEW_TYPEINDEXDISCOVERY_H
13 #include "llvm/ADT/SmallVector.h"
14 #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
15 #include "llvm/DebugInfo/CodeView/TypeRecord.h"
16 #include "llvm/Support/Error.h"
20 enum class TiRefKind { TypeRef, IndexRef };
27 void discoverTypeIndices(ArrayRef<uint8_t> RecordData,
28 SmallVectorImpl<TiReference> &Refs);
29 void discoverTypeIndices(const CVType &Type,
30 SmallVectorImpl<TiReference> &Refs);
31 void discoverTypeIndices(const CVType &Type,
32 SmallVectorImpl<TypeIndex> &Indices);
34 /// Discover type indices in symbol records. Returns false if this is an unknown
36 bool discoverTypeIndices(const CVSymbol &Symbol,
37 SmallVectorImpl<TiReference> &Refs);