[llvm] d09a284 - [CodeGen] Drop unnecessary const from return types (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 28 00:38:27 PST 2021


Author: Kazu Hirata
Date: 2021-12-28T00:38:11-08:00
New Revision: d09a284dfbd17424ebfb7806e830a9b64b8e70a7

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

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

Identified with readability-const-return-type.

Added: 
    

Modified: 
    llvm/lib/CodeGen/TargetPassConfig.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index 402e21d3708b1..6d9d226992732 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -328,7 +328,7 @@ static IdentifyingPassPtr overridePass(AnalysisID StandardID,
 
 // Find the FSProfile file name. The internal option takes the precedence
 // before getting from TargetMachine.
-static const std::string getFSProfileFile(const TargetMachine *TM) {
+static std::string getFSProfileFile(const TargetMachine *TM) {
   if (!FSProfileFile.empty())
     return FSProfileFile.getValue();
   const Optional<PGOOptions> &PGOOpt = TM->getPGOOption();
@@ -339,7 +339,7 @@ static const std::string getFSProfileFile(const TargetMachine *TM) {
 
 // Find the Profile remapping file name. The internal option takes the
 // precedence before getting from TargetMachine.
-static const std::string getFSRemappingFile(const TargetMachine *TM) {
+static std::string getFSRemappingFile(const TargetMachine *TM) {
   if (!FSRemappingFile.empty())
     return FSRemappingFile.getValue();
   const Optional<PGOOptions> &PGOOpt = TM->getPGOOption();


        


More information about the llvm-commits mailing list