diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2023-11-05 23:22:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-05 15:22:56 -0800 |
commit | c670cdb968609d57dd490075cd3567402bba8eed (patch) | |
tree | 01ee97ca30433d6036c59acdd11bdbfb4e83e2fb /llvm/lib/MC/ELFObjectWriter.cpp | |
parent | 1d95a071d6fc43fb413a0d3f5a9d1e52a18abab0 (diff) | |
download | llvm-c670cdb968609d57dd490075cd3567402bba8eed.zip llvm-c670cdb968609d57dd490075cd3567402bba8eed.tar.gz llvm-c670cdb968609d57dd490075cd3567402bba8eed.tar.bz2 |
[sanitizers] Do not define __has_feature in sanitizer/common_interface_defs.h (#66628)
Public headers intended for user code should not define `__has_feature`,
because this can break preprocessor checks done later in user code, e.g.
if they test `#ifdef __has_feature` to check for real support in the
compiler.
Replace the only use in the public header with a check for it being
supported before trying to use it. Define the fallback definition in the
internal headers, so that other internal sanitizer headers can continue
to use it as preferred.
This resolves a bug reported to GCC as https://gcc.gnu.org/PR109882
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
0 files changed, 0 insertions, 0 deletions