Add getSource() to SuccIterator
authorTobias Grosser <grosser@fim.uni-passau.de>
Wed, 13 Jan 2010 22:21:43 +0000 (22:21 +0000)
committerTobias Grosser <grosser@fim.uni-passau.de>
Wed, 13 Jan 2010 22:21:43 +0000 (22:21 +0000)
Get the source BB of an iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93364 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/CFG.h

index 71e76f866c916d3ac184ef3b541401a741e608b5..90b95bf7cfd76ee50bee44ccab9d07d1ac58fcec 100644 (file)
@@ -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;