[PATCH] D125555: [clang] Add __has_target_feature

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 13 09:07:51 PDT 2022


yaxunl created this revision.
yaxunl added reviewers: rsmith, aaron.ballman, tra.
Herald added a project: All.
yaxunl requested review of this revision.

Depending on whether a target feature is enabled or not,
programs may choose different algorithm or different
builtin functions to use.

Instead of let each target to emit predefined macros
for specific target feature, this patch introduce a
function-like builtin macro __has_target_feature.


https://reviews.llvm.org/D125555

Files:
  clang/docs/LanguageExtensions.rst
  clang/docs/ReleaseNotes.rst
  clang/include/clang/Lex/Preprocessor.h
  clang/lib/Lex/PPMacroExpansion.cpp
  clang/test/Lexer/has_target_feature.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125555.429257.patch
Type: text/x-patch
Size: 4454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220513/de755895/attachment.bin>


More information about the cfe-commits mailing list