diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-03 14:10:23 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-07-03 14:10:23 +0000 |
| commit | 145449b1e420787bb99721a429341fa6be3adfb6 (patch) | |
| tree | 1d56ae694a6de602e348dd80165cf881a36600ed /clang/lib/CodeGen/CodeGenTypes.h | |
| parent | ecbca9f5fb7d7613d2b94982c4825eb0d33d6842 (diff) | |
Diffstat (limited to 'clang/lib/CodeGen/CodeGenTypes.h')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenTypes.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenTypes.h b/clang/lib/CodeGen/CodeGenTypes.h index 28b831222943..cd20563cbf75 100644 --- a/clang/lib/CodeGen/CodeGenTypes.h +++ b/clang/lib/CodeGen/CodeGenTypes.h @@ -76,7 +76,7 @@ class CodeGenTypes { llvm::DenseMap<const Type*, llvm::StructType *> RecordDeclTypes; /// Hold memoized CGFunctionInfo results. - llvm::FoldingSet<CGFunctionInfo> FunctionInfos; + llvm::FoldingSet<CGFunctionInfo> FunctionInfos{FunctionInfosLog2InitSize}; /// This set keeps track of records that we're currently converting /// to an IR type. For example, when converting: @@ -96,8 +96,9 @@ class CodeGenTypes { /// corresponding llvm::Type. llvm::DenseMap<const Type *, llvm::Type *> TypeCache; - llvm::SmallSet<const Type *, 8> RecordsWithOpaqueMemberPointers; + llvm::DenseMap<const Type *, llvm::Type *> RecordsWithOpaqueMemberPointers; + static constexpr unsigned FunctionInfosLog2InitSize = 9; /// Helper for ConvertType. llvm::Type *ConvertFunctionTypeInternal(QualType FT); |
