[llvm] 5371ab4 - [IR] Change access rights of PredIterator members

Dmitry Vassiliev via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 05:26:34 PDT 2022


Author: Dmitry Vassiliev
Date: 2022-08-15T14:25:58+02:00
New Revision: 5371ab445618297ce4e54fe2e6cb36744007f35b

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

LOG: [IR] Change access rights of PredIterator members

These members were made private here https://github.com/llvm/llvm-project/commit/6177386b05ddaaee04160b153a41ed4edbd7bcaf without an explanation.
Our customers have an own implementation inherited from PredIterator with updated advancePastNonTerminators().
The access specifier protected looks resonable and safe here.

Reviewed By: RKSimon

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

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 28a8d31a4cc60..12ca1b1b9aa97 100644
--- a/llvm/include/llvm/IR/CFG.h
+++ b/llvm/include/llvm/IR/CFG.h
@@ -47,7 +47,7 @@ class PredIterator {
   using pointer = Ptr *;
   using reference = Ptr *;
 
-private:
+protected:
   using Self = PredIterator<Ptr, USE_iterator>;
   USE_iterator It;
 


        


More information about the llvm-commits mailing list