[InstCombine] Signed saturation patterns
[llvm-complete.git] / include / llvm / DebugInfo / CodeView / TypeTableCollection.h
blob5cbe3400e02920cf7b6c8b78a8f391ae51a68740
1 //===- TypeTableCollection.h ---------------------------------- *- C++ --*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_DEBUGINFO_CODEVIEW_TYPETABLECOLLECTION_H
10 #define LLVM_DEBUGINFO_CODEVIEW_TYPETABLECOLLECTION_H
12 #include "llvm/DebugInfo/CodeView/TypeCollection.h"
13 #include "llvm/Support/StringSaver.h"
15 #include <vector>
17 namespace llvm {
18 namespace codeview {
20 class TypeTableCollection : public TypeCollection {
21 public:
22 explicit TypeTableCollection(ArrayRef<ArrayRef<uint8_t>> Records);
24 Optional<TypeIndex> getFirst() override;
25 Optional<TypeIndex> getNext(TypeIndex Prev) override;
27 CVType getType(TypeIndex Index) override;
28 StringRef getTypeName(TypeIndex Index) override;
29 bool contains(TypeIndex Index) override;
30 uint32_t size() override;
31 uint32_t capacity() override;
33 private:
34 BumpPtrAllocator Allocator;
35 StringSaver NameStorage;
36 std::vector<StringRef> Names;
37 ArrayRef<ArrayRef<uint8_t>> Records;
42 #endif