From b62daa9ec3b6da6e7251d99ddb737759323aec7b Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 2 Mar 2011 00:11:28 +0000 Subject: [PATCH] Make pred_iterator DefaultConstructible, and add an accessor to retrieve the underlying getOperandNo() value. llvm-svn: 126804 --- include/llvm/Support/CFG.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/llvm/Support/CFG.h b/include/llvm/Support/CFG.h index 9ba71fcca8a..d2ea12364e9 100644 --- a/include/llvm/Support/CFG.h +++ b/include/llvm/Support/CFG.h @@ -41,6 +41,7 @@ class PredIterator : public std::iteratoruse_begin()) { advancePastNonTerminators(); } @@ -64,6 +65,12 @@ public: 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 pred_iterator;