summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/RegionInfo.h
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2010-10-13 11:02:44 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2010-10-13 11:02:44 +0000
commitb227930cd6850e4c47358e671dbe2cdacb430def (patch)
tree7bdda5b853ae63af2f8ac7bb946582f344e785ca /include/llvm/Analysis/RegionInfo.h
parentede42b0a22fdb57eb70d0d8c780dc5d3283397c0 (diff)
downloadllvm-b227930cd6850e4c47358e671dbe2cdacb430def.tar.gz
llvm-b227930cd6850e4c47358e671dbe2cdacb430def.tar.bz2
llvm-b227930cd6850e4c47358e671dbe2cdacb430def.tar.xz
Add Region::isTopLevelRegion().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116402 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/RegionInfo.h')
-rw-r--r--include/llvm/Analysis/RegionInfo.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Analysis/RegionInfo.h b/include/llvm/Analysis/RegionInfo.h
index 4e7d303863..b6ac1b368f 100644
--- a/include/llvm/Analysis/RegionInfo.h
+++ b/include/llvm/Analysis/RegionInfo.h
@@ -292,6 +292,11 @@ public:
/// @return The depth of the region.
unsigned getDepth() const;
+ /// @brief Check if a Region is the TopLevel region.
+ ///
+ /// The toplevel region represents the whole function.
+ bool isTopLevelRegion() const { return exit == NULL; };
+
/// @brief Return a new (non canonical) region, that is obtained by joining
/// this region with its predecessors.
///