11 #include "llvm/Option/ArgList.h" 12 #include "llvm/Support/Host.h" 16 using namespace clang;
20 if (
const Arg *A = Args.getLastArg(clang::driver::options::OPT_march_EQ)) {
21 llvm::StringRef CPUName = A->getValue();
23 if (CPUName ==
"native") {
24 std::string CPU = llvm::sys::getHostCPUName();
25 if (!CPU.empty() && CPU !=
"generic")
37 std::vector<llvm::StringRef> &Features) {
39 if (Arg *A = Args.getLastArg(options::OPT_mhtm, options::OPT_mno_htm)) {
40 if (A->getOption().matches(options::OPT_mhtm))
41 Features.push_back(
"+transactional-execution");
43 Features.push_back(
"-transactional-execution");
46 if (Arg *A = Args.getLastArg(options::OPT_mvx, options::OPT_mno_vx)) {
47 if (A->getOption().matches(options::OPT_mvx))
48 Features.push_back(
"+vector");
50 Features.push_back(
"-vector");
Dataflow Directional Tag Classes.