[llvm] b539f18 - [CFG/BasicBlock] Rename pred_const to const_pred. [NFC]

Alina Sbirlea via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 25 12:41:40 PDT 2020


Author: Alina Sbirlea
Date: 2020-03-25T12:40:55-07:00
New Revision: b539f18c565656cdd49fc0c37efbaa8e584b2d65

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

LOG: [CFG/BasicBlock] Rename pred_const to const_pred. [NFC]

Summary:
Rename `pred_const_range` to `const_pred_range` to make it consistent with
the other pred/succ iterator definitions.

Reviewers: nicholas, dblaikie, nlewycky

Subscribers: llvm-commits

Tags: #llvm

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

Added: 
    

Modified: 
    llvm/include/llvm/IR/CFG.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/IR/CFG.h b/llvm/include/llvm/IR/CFG.h
index 3b419da120d4..b166df954cd7 100644
--- a/llvm/include/llvm/IR/CFG.h
+++ b/llvm/include/llvm/IR/CFG.h
@@ -103,7 +103,7 @@ using pred_iterator = PredIterator<BasicBlock, Value::user_iterator>;
 using const_pred_iterator =
     PredIterator<const BasicBlock, Value::const_user_iterator>;
 using pred_range = iterator_range<pred_iterator>;
-using pred_const_range = iterator_range<const_pred_iterator>;
+using const_pred_range = iterator_range<const_pred_iterator>;
 
 inline pred_iterator pred_begin(BasicBlock *BB) { return pred_iterator(BB); }
 inline const_pred_iterator pred_begin(const BasicBlock *BB) {
@@ -124,8 +124,8 @@ inline unsigned pred_size(const BasicBlock *BB) {
 inline pred_range predecessors(BasicBlock *BB) {
   return pred_range(pred_begin(BB), pred_end(BB));
 }
-inline pred_const_range predecessors(const BasicBlock *BB) {
-  return pred_const_range(pred_begin(BB), pred_end(BB));
+inline const_pred_range predecessors(const BasicBlock *BB) {
+  return const_pred_range(pred_begin(BB), pred_end(BB));
 }
 
 //===----------------------------------------------------------------------===//


        


More information about the llvm-commits mailing list