diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-02-28 20:31:55 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-02-28 20:31:55 +0000 |
commit | ebeb737dbea833866a6cbfa66a9876083156baad (patch) | |
tree | 1699d1ad37517f89b17e092fcb43bf794a1e2449 /lib/Driver/ToolChains/Hexagon.cpp | |
parent | 896bb7d0d1d9a877403376fa6dd50ea452947300 (diff) | |
download | clang-ebeb737dbea833866a6cbfa66a9876083156baad.tar.gz |
[Hexagon] Add -ffixed-r19 driver option and translate it to +reserved-r19
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326366 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains/Hexagon.cpp')
-rw-r--r-- | lib/Driver/ToolChains/Hexagon.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/Driver/ToolChains/Hexagon.cpp b/lib/Driver/ToolChains/Hexagon.cpp index 31281737c7..77193cd047 100644 --- a/lib/Driver/ToolChains/Hexagon.cpp +++ b/lib/Driver/ToolChains/Hexagon.cpp @@ -521,11 +521,15 @@ unsigned HexagonToolChain::getOptimizationLevel( void HexagonToolChain::addClangTargetOptions(const ArgList &DriverArgs, ArgStringList &CC1Args, Action::OffloadKind) const { - if (DriverArgs.hasArg(options::OPT_ffp_contract)) - return; - unsigned OptLevel = getOptimizationLevel(DriverArgs); - if (OptLevel >= 3) - CC1Args.push_back("-ffp-contract=fast"); + if (!DriverArgs.hasArg(options::OPT_ffp_contract)) { + unsigned OptLevel = getOptimizationLevel(DriverArgs); + if (OptLevel >= 3) + CC1Args.push_back("-ffp-contract=fast"); + } + if (DriverArgs.hasArg(options::OPT_ffixed_r19)) { + CC1Args.push_back("-target-feature"); + CC1Args.push_back("+reserved-r19"); + } } void HexagonToolChain::AddClangSystemIncludeArgs(const ArgList &DriverArgs, |