[clang] 64fe841 - Fix typo, targetFeature should be lowercase.

Zakk Chen via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 26 19:40:59 PDT 2020


Author: Zakk Chen
Date: 2020-03-26T19:40:04-07:00
New Revision: 64fe84185602b59c2e07c142b9772c6e855153cb

URL: https://github.com/llvm/llvm-project/commit/64fe84185602b59c2e07c142b9772c6e855153cb
DIFF: https://github.com/llvm/llvm-project/commit/64fe84185602b59c2e07c142b9772c6e855153cb.diff

LOG: Fix typo, targetFeature should be lowercase.

this fixing also enable llc -mattr=+cpuhelp

Reviewers: ziangwan, kongyi

Reviewed By: kongyi

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76757

Added: 
    

Modified: 
    clang/tools/driver/cc1_main.cpp
    llvm/lib/MC/MCSubtargetInfo.cpp

Removed: 
    


################################################################################
diff  --git a/clang/tools/driver/cc1_main.cpp b/clang/tools/driver/cc1_main.cpp
index d8c22f21706b..33477852d285 100644
--- a/clang/tools/driver/cc1_main.cpp
+++ b/clang/tools/driver/cc1_main.cpp
@@ -177,7 +177,7 @@ static int PrintSupportedCPUs(std::string TargetStr) {
   // the target machine will handle the mcpu printing
   llvm::TargetOptions Options;
   std::unique_ptr<llvm::TargetMachine> TheTargetMachine(
-      TheTarget->createTargetMachine(TargetStr, "", "+cpuHelp", Options, None));
+      TheTarget->createTargetMachine(TargetStr, "", "+cpuhelp", Options, None));
   return 0;
 }
 

diff  --git a/llvm/lib/MC/MCSubtargetInfo.cpp b/llvm/lib/MC/MCSubtargetInfo.cpp
index 7d38cd0f729b..ac4f590d6cf3 100644
--- a/llvm/lib/MC/MCSubtargetInfo.cpp
+++ b/llvm/lib/MC/MCSubtargetInfo.cpp
@@ -185,7 +185,7 @@ static FeatureBitset getFeatures(StringRef CPU, StringRef FS,
     // Check for help
     if (Feature == "+help")
       Help(ProcDesc, ProcFeatures);
-    else if (Feature == "+cpuHelp")
+    else if (Feature == "+cpuhelp")
       cpuHelp(ProcDesc);
     else
       ApplyFeatureFlag(Bits, Feature, ProcFeatures);


        


More information about the cfe-commits mailing list