]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/include/llvm/DebugInfo/CodeView/TypeIndexDiscovery.h
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306956, and update
[FreeBSD/FreeBSD.git] / contrib / llvm / include / llvm / DebugInfo / CodeView / TypeIndexDiscovery.h
1 //===- TypeIndexDiscovery.h -------------------------------------*- C++ -*-===//
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 #ifndef LLVM_DEBUGINFO_CODEVIEW_TYPEINDEXDISCOVERY_H
11 #define LLVM_DEBUGINFO_CODEVIEW_TYPEINDEXDISCOVERY_H
12
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"
17
18 namespace llvm {
19 namespace codeview {
20 enum class TiRefKind { TypeRef, IndexRef };
21 struct TiReference {
22   TiRefKind Kind;
23   uint32_t Offset;
24   uint32_t Count;
25 };
26
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);
33
34 /// Discover type indices in symbol records. Returns false if this is an unknown
35 /// record.
36 bool discoverTypeIndices(const CVSymbol &Symbol,
37                          SmallVectorImpl<TiReference> &Refs);
38 }
39 }
40
41 #endif