Skip to content

Commit d77d727

Browse files
committed
[LLD] [COFF] Fix a ubsan error in pdb-type-server-missing.yaml
This error has been present since 5519e4d. Differential Revision: https://reviews.llvm.org/D89027
1 parent fc5e68f commit d77d727

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lld/COFF/DebugTypes.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,8 @@ void TypeMerger::mergeTypesWithGHash() {
10881088
}
10891089
parallelSort(entries, std::less<GHashCell>());
10901090
log(formatv("ghash table load factor: {0:p} (size {1} / capacity {2})\n",
1091-
double(entries.size()) / tableSize, entries.size(), tableSize));
1091+
tableSize ? double(entries.size()) / tableSize : 0,
1092+
entries.size(), tableSize));
10921093

10931094
// Find out how many type and item indices there are.
10941095
auto mid =

0 commit comments

Comments
 (0)