This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
yaxunl marked an inline comment as done.
Closed by commit rGcefe472c51fb: [clang] Fix __has_builtin (authored by yaxunl).
Herald added a project: clang.
Changed prior t
yaxunl marked an inline comment as done.
yaxunl added inline comments.
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:2555-2557
if (FeatureList.empty())
return;
assert(!FeatureList.contains(' ') && "Space in feature list");
tra wrote:
> Should
tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.
LGTM with a possible nit.
Comment at: clang/lib/Basic/BuiltinTargetFeatures.h:32
+/// pairs.
+class TargetFeatures {
+ struct FeatureListStatus {
yaxunl wrote:
>
yaxunl updated this revision to Diff 430420.
yaxunl marked 2 inline comments as done.
yaxunl added a comment.
revised by Artem's comments
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125829/new/
https://reviews.llvm.org/D125829
Files:
clang/include/clang/Basic/Builtins.h
clang/lib
yaxunl marked 2 inline comments as done.
yaxunl added inline comments.
Comment at: clang/include/clang/Basic/Builtins.h:263
+ ///false if it is disabled.
+ bool isRequiredTargetFeaturesEnabled(
+ unsigned BuiltinID, const llvm::StringMap &TargetFetureMap) const;
--
tra added a subscriber: echristo.
tra added a comment.
@echristo - FYI, in case you have an opinion on target builtin feature checks.
Comment at: clang/include/clang/Basic/Builtins.h:263
+ ///false if it is disabled.
+ bool isRequiredTargetFeaturesEnabled(
+ unsigned
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 targ