diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2015-07-27 19:29:04 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2015-07-27 19:29:04 +0000 |
commit | 925004703230ee5324b1cf20ba018d5ef4de8761 (patch) | |
tree | 254b164301d48f8e1c56e8e9a1a21c06f2a80846 /clang/lib/Driver/Tools.cpp | |
parent | 6cfb894892c0ba0e635b2997ea0e5b31e1a64fad (diff) | |
download | bcm5719-llvm-925004703230ee5324b1cf20ba018d5ef4de8761.tar.gz bcm5719-llvm-925004703230ee5324b1cf20ba018d5ef4de8761.zip |
[AArch64] Unconditionally pass subtarget feature reserve-x18 on Darwin.
After r243308, the front-end is responsible for checking the target OS and
passing reserve-x18 if the target is Darwin.
llvm-svn: 243310
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index becd9baffcf..b2e8403fe1f 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -1927,7 +1927,9 @@ getAArch64MicroArchFeaturesFromMcpu(const Driver &D, StringRef Mcpu, return getAArch64MicroArchFeaturesFromMtune(D, CPU, Args, Features); } -static void getAArch64TargetFeatures(const Driver &D, const ArgList &Args, +static void getAArch64TargetFeatures(const Driver &D, + const llvm::Triple &Triple, + const ArgList &Args, std::vector<const char *> &Features) { Arg *A; bool success = true; @@ -1968,7 +1970,7 @@ static void getAArch64TargetFeatures(const Driver &D, const ArgList &Args, Features.push_back("-crc"); } - if (Args.hasArg(options::OPT_ffixed_x18)) + if (Args.hasArg(options::OPT_ffixed_x18) || Triple.isOSDarwin()) Features.push_back("+reserve-x18"); } @@ -2003,7 +2005,7 @@ static void getTargetFeatures(const Driver &D, const llvm::Triple &Triple, break; case llvm::Triple::aarch64: case llvm::Triple::aarch64_be: - getAArch64TargetFeatures(D, Args, Features); + getAArch64TargetFeatures(D, Triple, Args, Features); break; case llvm::Triple::x86: case llvm::Triple::x86_64: |