[llvm-commits] [PATCH 1/2] Region: Check the exit region before use it when expanding a region.

ether zhhb etherzhhb at gmail.com
Mon Apr 4 03:20:12 PDT 2011


hi,

On Mon, Apr 4, 2011 at 5:40 PM, Jay Foad <jay.foad at gmail.com> wrote:
> On 4 April 2011 10:12, ether zhhb <etherzhhb at gmail.com> wrote:
>> +  assert(R && "Can not find a region for exit!");
>
> "Cannot" is one word.
fixed
>
> Jay.
>
best regards
ether
---
 lib/Analysis/RegionInfo.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/Analysis/RegionInfo.cpp b/lib/Analysis/RegionInfo.cpp
index e2f6a8b..36a4156 100644
--- a/lib/Analysis/RegionInfo.cpp
+++ b/lib/Analysis/RegionInfo.cpp
@@ -394,6 +394,7 @@ Region *Region::getExpandedRegion() const {

   Region *R = RI->getRegionFor(exit);

+  assert(R && "Cannot find a region for exit!");
   if (R->getEntry() != exit) {
     if (exit->getTerminator()->getNumSuccessors() == 1)
       return new Region(getEntry(), *succ_begin(exit), RI, DT);
-- 
1.7.3.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Region-Check-the-exit-region-before-use-it-when-expa.patch
Type: application/octet-stream
Size: 819 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110404/ed3a9541/attachment.obj>


More information about the llvm-commits mailing list