aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Support/CFG.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Support/CFG.h b/include/llvm/Support/CFG.h
index 71e76f866c..90b95bf7cf 100644
--- a/include/llvm/Support/CFG.h
+++ b/include/llvm/Support/CFG.h
@@ -189,6 +189,11 @@ public:
// tmp += offset;
// return tmp.operator*();
// }
+
+ /// Get the source BB of this iterator.
+ inline BB_ *getSource() {
+ return Term->getParent();
+ }
};
typedef SuccIterator<TerminatorInst*, BasicBlock> succ_iterator;