[ELF][ARM] Increase default max-page-size from 4096 to 6536
[llvm-project.git] / lld / COFF / TypeMerger.h
blobe2cfe668cfa591ad288e0e16840ff77823603090
1 //===- TypeMerger.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 LLD_COFF_TYPEMERGER_H
10 #define LLD_COFF_TYPEMERGER_H
12 #include "Config.h"
13 #include "llvm/DebugInfo/CodeView/GlobalTypeTableBuilder.h"
14 #include "llvm/DebugInfo/CodeView/MergingTypeTableBuilder.h"
15 #include "llvm/Support/Allocator.h"
17 namespace lld {
18 namespace coff {
20 class TypeMerger {
21 public:
22 TypeMerger(llvm::BumpPtrAllocator &alloc)
23 : typeTable(alloc), iDTable(alloc), globalTypeTable(alloc),
24 globalIDTable(alloc) {}
26 /// Get the type table or the global type table if /DEBUG:GHASH is enabled.
27 inline llvm::codeview::TypeCollection &getTypeTable() {
28 if (config->debugGHashes)
29 return globalTypeTable;
30 return typeTable;
33 /// Get the ID table or the global ID table if /DEBUG:GHASH is enabled.
34 inline llvm::codeview::TypeCollection &getIDTable() {
35 if (config->debugGHashes)
36 return globalIDTable;
37 return iDTable;
40 /// Type records that will go into the PDB TPI stream.
41 llvm::codeview::MergingTypeTableBuilder typeTable;
43 /// Item records that will go into the PDB IPI stream.
44 llvm::codeview::MergingTypeTableBuilder iDTable;
46 /// Type records that will go into the PDB TPI stream (for /DEBUG:GHASH)
47 llvm::codeview::GlobalTypeTableBuilder globalTypeTable;
49 /// Item records that will go into the PDB IPI stream (for /DEBUG:GHASH)
50 llvm::codeview::GlobalTypeTableBuilder globalIDTable;
53 /// Map from type index and item index in a type server PDB to the
54 /// corresponding index in the destination PDB.
55 struct CVIndexMap {
56 llvm::SmallVector<llvm::codeview::TypeIndex, 0> tpiMap;
57 llvm::SmallVector<llvm::codeview::TypeIndex, 0> ipiMap;
58 bool isTypeServerMap = false;
59 bool isPrecompiledTypeMap = false;
62 } // namespace coff
63 } // namespace lld
65 #endif