forked from OSchip/llvm-project
[Hexagon] Move getHexagonTargetFeatures to Hexagon.cpp (NFC)
Differential Revision: https://reviews.llvm.org/D38548 llvm-svn: 314926
This commit is contained in:
parent
feefb0870f
commit
2d9aa7432f
|
@ -273,21 +273,6 @@ static void ParseMRecip(const Driver &D, const ArgList &Args,
|
|||
OutStrings.push_back(Args.MakeArgString(Out));
|
||||
}
|
||||
|
||||
static void getHexagonTargetFeatures(const ArgList &Args,
|
||||
std::vector<StringRef> &Features) {
|
||||
handleTargetFeaturesGroup(Args, Features,
|
||||
options::OPT_m_hexagon_Features_Group);
|
||||
|
||||
bool UseLongCalls = false;
|
||||
if (Arg *A = Args.getLastArg(options::OPT_mlong_calls,
|
||||
options::OPT_mno_long_calls)) {
|
||||
if (A->getOption().matches(options::OPT_mlong_calls))
|
||||
UseLongCalls = true;
|
||||
}
|
||||
|
||||
Features.push_back(UseLongCalls ? "+long-calls" : "-long-calls");
|
||||
}
|
||||
|
||||
static void getWebAssemblyTargetFeatures(const ArgList &Args,
|
||||
std::vector<StringRef> &Features) {
|
||||
handleTargetFeaturesGroup(Args, Features, options::OPT_m_wasm_Features_Group);
|
||||
|
@ -349,7 +334,7 @@ static void getTargetFeatures(const ToolChain &TC, const llvm::Triple &Triple,
|
|||
x86::getX86TargetFeatures(D, Triple, Args, Features);
|
||||
break;
|
||||
case llvm::Triple::hexagon:
|
||||
getHexagonTargetFeatures(Args, Features);
|
||||
hexagon::getHexagonTargetFeatures(Args, Features);
|
||||
break;
|
||||
case llvm::Triple::wasm32:
|
||||
case llvm::Triple::wasm64:
|
||||
|
|
|
@ -27,6 +27,22 @@ using namespace clang::driver::toolchains;
|
|||
using namespace clang;
|
||||
using namespace llvm::opt;
|
||||
|
||||
// Hexagon target features.
|
||||
void hexagon::getHexagonTargetFeatures(const ArgList &Args,
|
||||
std::vector<StringRef> &Features) {
|
||||
handleTargetFeaturesGroup(Args, Features,
|
||||
options::OPT_m_hexagon_Features_Group);
|
||||
|
||||
bool UseLongCalls = false;
|
||||
if (Arg *A = Args.getLastArg(options::OPT_mlong_calls,
|
||||
options::OPT_mno_long_calls)) {
|
||||
if (A->getOption().matches(options::OPT_mlong_calls))
|
||||
UseLongCalls = true;
|
||||
}
|
||||
|
||||
Features.push_back(UseLongCalls ? "+long-calls" : "-long-calls");
|
||||
}
|
||||
|
||||
// Hexagon tools start.
|
||||
void hexagon::Assembler::RenderExtraToolArgs(const JobAction &JA,
|
||||
ArgStringList &CmdArgs) const {
|
||||
|
|
|
@ -50,6 +50,10 @@ public:
|
|||
const llvm::opt::ArgList &TCArgs,
|
||||
const char *LinkingOutput) const override;
|
||||
};
|
||||
|
||||
void getHexagonTargetFeatures(const llvm::opt::ArgList &Args,
|
||||
std::vector<StringRef> &Features);
|
||||
|
||||
} // end namespace hexagon.
|
||||
} // end namespace tools
|
||||
|
||||
|
|
Loading…
Reference in New Issue