diff options
| author | Eric Christopher <echristo@gmail.com> | 2015-12-19 01:48:43 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2015-12-19 01:48:43 +0000 |
| commit | 75bea4d42b3178957c285c877b1e4a3e99593b42 (patch) | |
| tree | 478e2f22fbedbd6ed6714b19c33b458f05b91541 | |
| parent | 2aed6ca1d33468f7e6f8509213a1b9dcd8026ec1 (diff) | |
| download | bcm5719-llvm-75bea4d42b3178957c285c877b1e4a3e99593b42.tar.gz bcm5719-llvm-75bea4d42b3178957c285c877b1e4a3e99593b42.zip | |
Use a command line alias to remove the need to rewrite a subtarget
feature for command line compatibility.
llvm-svn: 256076
| -rw-r--r-- | clang/include/clang/Driver/Options.td | 6 | ||||
| -rw-r--r-- | clang/lib/Driver/Tools.cpp | 8 |
2 files changed, 4 insertions, 10 deletions
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 1bcc0604173..ba65203f5e8 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -1414,8 +1414,10 @@ def mcmpb : Flag<["-"], "mcmpb">, Group<m_ppc_Features_Group>; def mno_cmpb : Flag<["-"], "mno-cmpb">, Group<m_ppc_Features_Group>; def misel : Flag<["-"], "misel">, Group<m_ppc_Features_Group>; def mno_isel : Flag<["-"], "mno-isel">, Group<m_ppc_Features_Group>; -def mmfcrf : Flag<["-"], "mmfcrf">, Group<m_ppc_Features_Group>; -def mno_mfcrf : Flag<["-"], "mno-mfcrf">, Group<m_ppc_Features_Group>; +def mmfocrf : Flag<["-"], "mmfocrf">, Group<m_ppc_Features_Group>; +def mmfcrf : Flag<["-"], "mmfcrf">, Alias<mmfocrf>; +def mno_mfocrf : Flag<["-"], "mno-mfocrf">, Group<m_ppc_Features_Group>; +def mno_mfcrf : Flag<["-"], "mno-mfcrf">, Alias<mno_mfocrf>; def mpopcntd : Flag<["-"], "mpopcntd">, Group<m_ppc_Features_Group>; def mno_popcntd : Flag<["-"], "mno-popcntd">, Group<m_ppc_Features_Group>; def mqpx : Flag<["-"], "mqpx">, Group<m_ppc_Features_Group>; diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index a86308d9c3a..042a0ff2668 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -1421,14 +1421,6 @@ static void getPPCTargetFeatures(const Driver &D, const llvm::Triple &Triple, bool IsNegative = Name.startswith("no-"); if (IsNegative) Name = Name.substr(3); - - // Note that gcc calls this mfcrf and LLVM calls this mfocrf so we - // pass the correct option to the backend while calling the frontend - // option the same. - // TODO: Change the LLVM backend option maybe? - if (Name == "mfcrf") - Name = "mfocrf"; - Features.push_back(Args.MakeArgString((IsNegative ? "-" : "+") + Name)); } |

