1 //===- TypeTableCollection.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_TYPETABLECOLLECTION_H
11 #define LLVM_DEBUGINFO_CODEVIEW_TYPETABLECOLLECTION_H
13 #include "llvm/DebugInfo/CodeView/TypeCollection.h"
14 #include "llvm/DebugInfo/CodeView/TypeDatabase.h"
19 class TypeTableCollection : public TypeCollection {
21 explicit TypeTableCollection(ArrayRef<ArrayRef<uint8_t>> Records);
23 Optional<TypeIndex> getFirst() override;
24 Optional<TypeIndex> getNext(TypeIndex Prev) override;
26 CVType getType(TypeIndex Index) override;
27 StringRef getTypeName(TypeIndex Index) override;
28 bool contains(TypeIndex Index) override;
29 uint32_t size() override;
30 uint32_t capacity() override;
33 bool hasCapacityFor(TypeIndex Index) const;
34 void ensureTypeExists(TypeIndex Index);
36 ArrayRef<ArrayRef<uint8_t>> Records;
37 TypeDatabase Database;