diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2010-10-13 05:54:10 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2010-10-13 05:54:10 +0000 |
commit | 4bcc0228dcc90385e90f22cef38b2614d3aa3cd1 (patch) | |
tree | a74f76ee3b8b4a38eff8d9aab3e937f6187e9af3 /lib/Analysis/RegionInfo.cpp | |
parent | 9649390e1fcb6d42e228364230f16409ad150fef (diff) |
RegionInfo: Allow to update exit and entry of a region.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116396 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionInfo.cpp')
-rw-r--r-- | lib/Analysis/RegionInfo.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Analysis/RegionInfo.cpp b/lib/Analysis/RegionInfo.cpp index 75ca61f67c..0bf6aad48a 100644 --- a/lib/Analysis/RegionInfo.cpp +++ b/lib/Analysis/RegionInfo.cpp @@ -72,6 +72,15 @@ Region::~Region() { delete *I; } +void Region::replaceEntry(BasicBlock *BB) { + entry.setPointer(BB); +} + +void Region::replaceExit(BasicBlock *BB) { + assert(exit && "No exit to replace!"); + exit = BB; +} + bool Region::contains(const BasicBlock *B) const { BasicBlock *BB = const_cast<BasicBlock*>(B); |