[clang] ee3f557 - [Basic] Drop unnecessary const from return types (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 29 08:55:48 PST 2021


Author: Kazu Hirata
Date: 2021-12-29T08:55:37-08:00
New Revision: ee3f557a9cfefdcf07d4fc1394cb05098a2c2508

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

LOG: [Basic] Drop unnecessary const from return types (NFC)

Identified with readability-const-return-type.

Added: 
    

Modified: 
    clang/include/clang/Basic/TargetID.h
    clang/lib/Basic/TargetID.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/TargetID.h b/clang/include/clang/Basic/TargetID.h
index a55b15e9b92c0..2579276fc0340 100644
--- a/clang/include/clang/Basic/TargetID.h
+++ b/clang/include/clang/Basic/TargetID.h
@@ -21,7 +21,7 @@ namespace clang {
 /// postfixed by a plus or minus sign delimited by colons, e.g.
 /// gfx908:xnack+:sramecc-. Each processor have a limited
 /// number of predefined features when showing up in a target ID.
-const llvm::SmallVector<llvm::StringRef, 4>
+llvm::SmallVector<llvm::StringRef, 4>
 getAllPossibleTargetIDFeatures(const llvm::Triple &T,
                                llvm::StringRef Processor);
 

diff  --git a/clang/lib/Basic/TargetID.cpp b/clang/lib/Basic/TargetID.cpp
index 59d416f0e015d..3b8f4c13b9bf0 100644
--- a/clang/lib/Basic/TargetID.cpp
+++ b/clang/lib/Basic/TargetID.cpp
@@ -15,7 +15,7 @@
 
 namespace clang {
 
-static const llvm::SmallVector<llvm::StringRef, 4>
+static llvm::SmallVector<llvm::StringRef, 4>
 getAllPossibleAMDGPUTargetIDFeatures(const llvm::Triple &T,
                                      llvm::StringRef Proc) {
   // Entries in returned vector should be in alphabetical order.
@@ -33,7 +33,7 @@ getAllPossibleAMDGPUTargetIDFeatures(const llvm::Triple &T,
   return Ret;
 }
 
-const llvm::SmallVector<llvm::StringRef, 4>
+llvm::SmallVector<llvm::StringRef, 4>
 getAllPossibleTargetIDFeatures(const llvm::Triple &T,
                                llvm::StringRef Processor) {
   llvm::SmallVector<llvm::StringRef, 4> Ret;


        


More information about the cfe-commits mailing list