diff options
author | David Benjamin <davidben@google.com> | 2024-09-17 11:22:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-17 11:22:27 -0400 |
commit | adeae925dcd7db0d49256f687c66a662d6604128 (patch) | |
tree | 23fe3106e33ac48564ea2b21b90b63a50437c53b /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 6f5dd6563017a11cf1486654d2350ef97054abef (diff) | |
download | llvm-adeae925dcd7db0d49256f687c66a662d6604128.zip llvm-adeae925dcd7db0d49256f687c66a662d6604128.tar.gz llvm-adeae925dcd7db0d49256f687c66a662d6604128.tar.bz2 |
[libc++] Make _LIBCPP_ASSUME usable when it is appropriate (#91801)
libc++ turned off _LIBCPP_ASSUME because turning every debug assert into
__builtin_assume tripped [1]. However, this means we can't use _LIBCPP_ASSUME
when there is a clear optimization intent. See [2] for discussion of a place
where _LIBCPP_ASSUME would be valuable.
This patch fixes this by not undefining the definition of _LIBCPP_ASSUME and
making sure that we don't attempt to `_LIBCPP_ASSSUME` every assertion in
the library.
[1]: https://discourse.llvm.org/t/llvm-assume-blocks-optimization/71609
[2]: https://github.com/llvm/llvm-project/pull/78929#issuecomment-1936582711
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions