[llvm-commits] [llvm] r126804 - /llvm/trunk/include/llvm/Support/CFG.h
Dan Gohman
gohman at apple.com
Tue Mar 1 16:11:28 PST 2011
Author: djg
Date: Tue Mar 1 18:11:28 2011
New Revision: 126804
URL: http://llvm.org/viewvc/llvm-project?rev=126804&view=rev
Log:
Make pred_iterator DefaultConstructible, and add an accessor to
retrieve the underlying getOperandNo() value.
Modified:
llvm/trunk/include/llvm/Support/CFG.h
Modified: llvm/trunk/include/llvm/Support/CFG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CFG.h?rev=126804&r1=126803&r2=126804&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/CFG.h (original)
+++ llvm/trunk/include/llvm/Support/CFG.h Tue Mar 1 18:11:28 2011
@@ -41,6 +41,7 @@
public:
typedef typename super::pointer pointer;
+ PredIterator() {}
explicit inline PredIterator(Ptr *bb) : It(bb->use_begin()) {
advancePastNonTerminators();
}
@@ -64,6 +65,12 @@
inline Self operator++(int) { // Postincrement
Self tmp = *this; ++*this; return tmp;
}
+
+ /// getOperandNo - Return the operand number in the predecessor's
+ /// terminator of the successor.
+ unsigned getOperandNo() const {
+ return It.getOperandNo();
+ }
};
typedef PredIterator<BasicBlock, Value::use_iterator> pred_iterator;
More information about the llvm-commits
mailing list