llvm-project/llvm
Paul Kirth 4683a2effa [llvm][misexpect] Avoid division by 0 when using sample profiling
MisExpect diagnostics should not prevent compilation from succeeding, and the
assertion is insufficient to prevent division by zero in release builds.

This patch addresses that by replacing the assert with an early return.

Additionally, it disables MisExpect diagnostics when using sample profiling,
since this is the only known case where this error has manifested.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D124302
2022-04-22 22:48:00 +00:00
..
benchmarks
bindings [LegacyPM] Remove AddressSanitizerLegacyPass 2022-04-21 19:25:57 -07:00
cmake [CMake] Check for problematic MSVC + /arch:AVX configuration 2022-04-21 09:46:44 +02:00
docs Revert "[asan] Emit .size directive for global object size before redzone" 2022-04-21 16:21:17 -07:00
examples [examples][ORC] Add a new example showing the ORCv2 removable code APIs. 2022-04-12 15:05:07 -07:00
include [asan] Enable detect_stack_use_after_return=1 by default 2022-04-22 15:31:43 -07:00
lib [llvm][misexpect] Avoid division by 0 when using sample profiling 2022-04-22 22:48:00 +00:00
projects
resources
runtimes Revert "[runtimes] Create Tests.cmake if it does not exist" 2022-04-01 09:29:54 -07:00
test Recommit "[SLP][AArch64] Implement lookahead operand reordering score of splat loads for AArch64" 2022-04-22 15:44:02 -07:00
tools llvm-reduce: Fix cloning unset maxCallFrameSize 2022-04-22 18:28:45 -04:00
unittests [DWARF] Add API to get data from MCDwarfLineStr 2022-04-21 14:08:20 -07:00
utils TableGen/GlobalISel: Make address space/align predicates consistent 2022-04-22 15:48:07 -04:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [cmake] Remove LLVM_ENABLE_NEW_PASS_MANAGER cmake option 2022-04-06 09:52:21 +02:00
CODE_OWNERS.TXT [SPIR-V](1/6) Add stub for SPIRV backend 2022-04-20 01:10:25 +02:00
CREDITS.TXT
LICENSE.TXT
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.