aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2023-09-14 11:11:27 -0700
committerGitHub <noreply@github.com>2023-09-14 11:11:27 -0700
commitb0c8c454238b495ebe4df25a161a120d1707c230 (patch)
treeb985db632cc8d541c3e0dd642df4b828fe935874 /clang/lib/Frontend/CompilerInvocation.cpp
parente80a8b4ab61ef6aba119adf5f64a4644b7e0a44b (diff)
downloadllvm-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