[llvm] de6c49a - [Transforms/Utils] Drop unnecessary const from a return type (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 22:34:19 PST 2021


Author: Kazu Hirata
Date: 2021-02-08T22:33:49-08:00
New Revision: de6c49ae3182e0833eddbec97a729ad60cad2ee2

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

LOG: [Transforms/Utils] Drop unnecessary const from a return type (NFC)

Identified with const-return-type.

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/PredicateInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/PredicateInfo.cpp b/llvm/lib/Transforms/Utils/PredicateInfo.cpp
index af5a72aa6ad9..fe69382b4ad8 100644
--- a/llvm/lib/Transforms/Utils/PredicateInfo.cpp
+++ b/llvm/lib/Transforms/Utils/PredicateInfo.cpp
@@ -77,8 +77,7 @@ static Instruction *getBranchTerminator(const PredicateBase *PB) {
 
 // Given a predicate info that is a type of branching terminator, get the
 // edge this predicate info represents
-const std::pair<BasicBlock *, BasicBlock *>
-getBlockEdge(const PredicateBase *PB) {
+std::pair<BasicBlock *, BasicBlock *> getBlockEdge(const PredicateBase *PB) {
   assert(isa<PredicateWithEdge>(PB) &&
          "Not a predicate info type we know how to get an edge from.");
   const auto *PEdge = cast<PredicateWithEdge>(PB);
@@ -158,8 +157,7 @@ struct ValueDFS_Compare {
   }
 
   // For a phi use, or a non-materialized def, return the edge it represents.
-  const std::pair<BasicBlock *, BasicBlock *>
-  getBlockEdge(const ValueDFS &VD) const {
+  std::pair<BasicBlock *, BasicBlock *> getBlockEdge(const ValueDFS &VD) const {
     if (!VD.Def && VD.U) {
       auto *PHI = cast<PHINode>(VD.U->getUser());
       return std::make_pair(PHI->getIncomingBlock(*VD.U), PHI->getParent());


        


More information about the llvm-commits mailing list