aboutsummaryrefslogtreecommitdiff
path: root/clang/test/AST/ByteCode/builtin-functions.cpp
diff options
context:
space:
mode:
authorSergio Afonso <safonsof@amd.com>2025-01-09 10:28:16 +0000
committerGitHub <noreply@github.com>2025-01-09 10:28:16 +0000
commitb79ed8729b3d6d5482481c41a7de2cd75b0f61df (patch)
treeb601c65c78741d191ac23f34de23b23f8362fe60 /clang/test/AST/ByteCode/builtin-functions.cpp
parent659cd2a48a25ec4deabf4c7937acbaec588a2724 (diff)
downloadllvm-b79ed8729b3d6d5482481c41a7de2cd75b0f61df.zip
llvm-b79ed8729b3d6d5482481c41a7de2cd75b0f61df.tar.gz
llvm-b79ed8729b3d6d5482481c41a7de2cd75b0f61df.tar.bz2
[OpenMP][OMPIRBuilder] Handle non-failing calls properly (#115863)
The preprocessor definition used to enable asserts and the one that `llvm::Error` and `llvm::Expected` use to ensure all created instances are checked are not the same. By making these checks inside of an `assert` in cases where errors are not expected, certain build configurations would trigger runtime failures (e.g. `-DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_UNREACHABLE_OPTIMIZE=ON`). The `llvm::cantFail()` function, which was intended for this use case, is used by this patch in place of `assert` to prevent these runtime failures. In tests, new preprocessor definitions based on `ASSERT_THAT_EXPECTED` and `EXPECT_THAT_EXPECTED` are used instead, to avoid silent failures in release builds.
Diffstat (limited to 'clang/test/AST/ByteCode/builtin-functions.cpp')
0 files changed, 0 insertions, 0 deletions