diff options
author | Matthias Braun <matze@braunis.de> | 2023-09-14 11:11:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 11:11:27 -0700 |
commit | b0c8c454238b495ebe4df25a161a120d1707c230 (patch) | |
tree | b985db632cc8d541c3e0dd642df4b828fe935874 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | e80a8b4ab61ef6aba119adf5f64a4644b7e0a44b (diff) | |
download | llvm-b0c8c454238b495ebe4df25a161a120d1707c230.zip llvm-b0c8c454238b495ebe4df25a161a120d1707c230.tar.gz llvm-b0c8c454238b495ebe4df25a161a120d1707c230.tar.bz2 |
Avoid BlockFrequency overflow problems (#66280)
Multiplying raw block frequency with an integer carries a high risk
of overflow.
- Add `BlockFrequency::mul` return an std::optional with the product
or `nullopt` to indicate an overflow.
- Fix two instances where overflow was likely.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions