mirror of
https://github.com/intel/llvm.git
synced 2026-01-18 07:57:36 +08:00
Use TargetParser to parse -mhwdiv command line option in Driver.
Change-Id: I2ebc40f77af75ec6b43ce8364d6d5a1d29988bd6 Phabricator: http://reviews.llvm.org/D11501 llvm-svn: 243398
This commit is contained in:
@@ -542,19 +542,8 @@ static void getARMArchCPUFromArgs(const ArgList &Args, llvm::StringRef &Arch,
|
||||
static void getARMHWDivFeatures(const Driver &D, const Arg *A,
|
||||
const ArgList &Args, StringRef HWDiv,
|
||||
std::vector<const char *> &Features) {
|
||||
if (HWDiv == "arm") {
|
||||
Features.push_back("+hwdiv-arm");
|
||||
Features.push_back("-hwdiv");
|
||||
} else if (HWDiv == "thumb") {
|
||||
Features.push_back("-hwdiv-arm");
|
||||
Features.push_back("+hwdiv");
|
||||
} else if (HWDiv == "arm,thumb" || HWDiv == "thumb,arm") {
|
||||
Features.push_back("+hwdiv-arm");
|
||||
Features.push_back("+hwdiv");
|
||||
} else if (HWDiv == "none") {
|
||||
Features.push_back("-hwdiv-arm");
|
||||
Features.push_back("-hwdiv");
|
||||
} else
|
||||
unsigned HWDivID = llvm::ARMTargetParser::parseHWDiv(HWDiv);
|
||||
if (!llvm::ARMTargetParser::getHWDivFeatures(HWDivID, Features))
|
||||
D.Diag(diag::err_drv_clang_unsupported) << A->getAsString(Args);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user