From 833f982d1410f324af8c80ba6d14bd7067e027fa Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Mon, 10 Aug 2015 12:28:52 +0000 Subject: [PATCH] [RegionInfo] More descriptive error messages in verifier git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244440 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/RegionInfoImpl.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/llvm/Analysis/RegionInfoImpl.h b/include/llvm/Analysis/RegionInfoImpl.h index b31eefc15f7..38bc365b8b9 100644 --- a/include/llvm/Analysis/RegionInfoImpl.h +++ b/include/llvm/Analysis/RegionInfoImpl.h @@ -236,7 +236,7 @@ std::string RegionBase::getNameStr() const { template void RegionBase::verifyBBInRegion(BlockT *BB) const { if (!contains(BB)) - llvm_unreachable("Broken region found!"); + llvm_unreachable("Broken region found: enumerated BB not in region!"); BlockT *entry = getEntry(), *exit = getExit(); @@ -244,7 +244,8 @@ void RegionBase::verifyBBInRegion(BlockT *BB) const { SE = BlockTraits::child_end(BB); SI != SE; ++SI) { if (!contains(*SI) && exit != *SI) - llvm_unreachable("Broken region found!"); + llvm_unreachable("Broken region found: edges leaving the region must go " + "to the exit node!"); } if (entry != BB) { @@ -252,7 +253,8 @@ void RegionBase::verifyBBInRegion(BlockT *BB) const { SE = InvBlockTraits::child_end(BB); SI != SE; ++SI) { if (!contains(*SI)) - llvm_unreachable("Broken region found!"); + llvm_unreachable("Broken region found: edges entering the region must " + "go to the entry node!"); } } } -- 2.34.1