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

Tobias Grosser grosser at fim.uni-passau.de
Sun Apr 3 23:53:29 PDT 2011


On 04/03/2011 11:27 PM, ether zhhb wrote:
>> From 0c43ee6358a05b19b6b9924e5de3074216b7bcd5 Mon Sep 17 00:00:00 2001
> From: ether<etherzhhb at gmail.com>
> Date: Mon, 4 Apr 2011 11:24:37 +0800
> Subject: [PATCH 1/2] Region: Check the exit region before use it when
> expanding a region.
>
> ---
>   lib/Analysis/RegionInfo.cpp |    3 +++
>   1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/lib/Analysis/RegionInfo.cpp b/lib/Analysis/RegionInfo.cpp
> index e2f6a8b..a5250cf 100644
> --- a/lib/Analysis/RegionInfo.cpp
> +++ b/lib/Analysis/RegionInfo.cpp
> @@ -394,6 +394,9 @@ Region *Region::getExpandedRegion() const {
>
>     Region *R = RI->getRegionFor(exit);
>
> +  if (!R)
> +    llvm_unreachable(("Can not find exit for region: " +
> getNameStr()).c_str());


Hey ether,

can you use an assert() here?

Cheers
Tobi



More information about the llvm-commits mailing list