Filter out invalid 'target' items from being passed to LLVM
authorErich Keane <erich.keane@intel.com>
Fri, 27 Oct 2017 18:32:23 +0000 (18:32 +0000)
committerErich Keane <erich.keane@intel.com>
Fri, 27 Oct 2017 18:32:23 +0000 (18:32 +0000)
commitcf8807c931fc2e8d6cd44cb38db49611758696f6
treeb120ac99e3a383b73962aa3667c8c7f66d793855
parentbc2b1650d7d59a4d24dccd4eb3992e5cd17acd65
Filter out invalid 'target' items from being passed to LLVM

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 and Feature Names.

One test was changed to i686, since it uses a lakemont,
which would otherwise be prohibited in x86_64.

Differential Revision: https://reviews.llvm.org/D39357

llvm-svn: 316783
clang/include/clang/Basic/TargetInfo.h
clang/lib/Basic/Targets/X86.cpp
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/CodeGen/attr-target-x86.c