[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 8 10:46:58 PDT 2018
craig.topper added inline comments.
================
Comment at: lib/CodeGen/CodeGenFunction.cpp:2342
// Only positive features are "required".
- if (F.getValue())
+ if (F.getValue()) {
+ if (std::any_of(ParsedAttr.Features.begin(), ParsedAttr.Features.end(),
----------------
Rather than walking the ParsedAttr.Features for each feature in the map. And having to shift the ReqFeatures vectors sometimes. How about doing this
-Walk through all features in ParsedAttr, for each feature with a +, query the callee feature map. If it's enabled there, push it to ReqFeatures.
-Walk through all features in the callee feature map and if enabled push those.
This will lead to duplicates in the list, but all the explicitly mentioned features will be listed first.
https://reviews.llvm.org/D46541
More information about the cfe-commits
mailing list