Line data Source code
1 : //===- TypeTableCollection.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_TYPETABLECOLLECTION_H
11 : #define LLVM_DEBUGINFO_CODEVIEW_TYPETABLECOLLECTION_H
12 :
13 : #include "llvm/DebugInfo/CodeView/TypeCollection.h"
14 : #include "llvm/Support/StringSaver.h"
15 :
16 : #include <vector>
17 :
18 : namespace llvm {
19 : namespace codeview {
20 :
21 250 : class TypeTableCollection : public TypeCollection {
22 : public:
23 : explicit TypeTableCollection(ArrayRef<ArrayRef<uint8_t>> Records);
24 :
25 : Optional<TypeIndex> getFirst() override;
26 : Optional<TypeIndex> getNext(TypeIndex Prev) override;
27 :
28 : CVType getType(TypeIndex Index) override;
29 : StringRef getTypeName(TypeIndex Index) override;
30 : bool contains(TypeIndex Index) override;
31 : uint32_t size() override;
32 : uint32_t capacity() override;
33 :
34 : private:
35 : BumpPtrAllocator Allocator;
36 : StringSaver NameStorage;
37 : std::vector<StringRef> Names;
38 : ArrayRef<ArrayRef<uint8_t>> Records;
39 : };
40 : }
41 : }
42 :
43 : #endif
|