[PATCH] D39357: Filter out invalid 'target' items from being passed to LLVM

2017-10-27 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316783: Filter out invalid 'target' items from being passed to LLVM (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D39357?vs=120659=120664#toc Repository: rL LLVM

[PATCH] D39357: Filter out invalid 'target' items from being passed to LLVM

2017-10-27 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D39357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D39357: Filter out invalid 'target' items from being passed to LLVM

2017-10-27 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 120659. erichkeane added a comment. Switched to llvm::remove_if(RANGE, lambda) instead of std::remove_if with begin/end per Craig's suggestion. https://reviews.llvm.org/D39357 Files: include/clang/Basic/TargetInfo.h lib/Basic/Targets/X86.cpp

[PATCH] D39357: Filter out invalid 'target' items from being passed to LLVM

2017-10-27 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:4586 +ParsedAttr.Features.erase( +remove_if(ParsedAttr.Features.begin(), ParsedAttr.Features.end(), +[&](const std::string ) { Use llvm::remove_if which takes a

[PATCH] D39357: Filter out invalid 'target' items from being passed to LLVM

2017-10-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Basic/Targets/X86.cpp:1173 .Case("x86", true) + .Case("x87", true) .Case("x86_32", true) A test also revealed that we forgot this as well. Craig just added sse4, which was also missing.

[PATCH] D39357: Filter out invalid 'target' items from being passed to LLVM

2017-10-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. Craig noticed that CodeGen wasn't properly ignoring the values sent to the target attribute. This patch ignores them. This patch also sets the 'default' for this checking to 'supported', since only X86 has implemented the support for checking valid CPU names