[PATCH] D125829: [clang] Fix __has_builtin
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 17 12:18:38 PDT 2022
yaxunl created this revision.
yaxunl added reviewers: tra, aaron.ballman, rsmith.
Herald added a project: All.
yaxunl requested review of this revision.
Fix `__has_builtin` to return 1 only if the requested target features
of a builtin are enabled by refactoring the code for checking
required target features of a builtin and use it in evaluation
of `__has_builtin`.
https://reviews.llvm.org/D125829
Files:
clang/include/clang/Basic/Builtins.h
clang/lib/Basic/BuiltinTargetFeatures.h
clang/lib/Basic/Builtins.cpp
clang/lib/CodeGen/CodeGenFunction.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/lib/Lex/PPMacroExpansion.cpp
clang/test/Preprocessor/hash_builtin.cpp
clang/unittests/CodeGen/CheckTargetFeaturesTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125829.430156.patch
Type: text/x-patch
Size: 11553 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220517/fb2a42c0/attachment-0001.bin>
More information about the cfe-commits
mailing list