]> granicus.if.org Git - clang/commitdiff
Use a command line alias to remove the need to rewrite a subtarget
authorEric Christopher <echristo@gmail.com>
Sat, 19 Dec 2015 01:48:43 +0000 (01:48 +0000)
committerEric Christopher <echristo@gmail.com>
Sat, 19 Dec 2015 01:48:43 +0000 (01:48 +0000)
feature for command line compatibility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256076 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Options.td
lib/Driver/Tools.cpp

index 1bcc0604173142cfd0895fef4b2702642a1007e7..ba65203f5e8076e0390d20c4aaba453c4a4ddb53 100644 (file)
@@ -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>;
index a86308d9c3a00a3acde0c30faa762a876fff963a..042a0ff26686966d0a82fa27e7f08be4a00b5b78 100644 (file)
@@ -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));
   }