[RegionInfo] More descriptive error messages in verifier
authorMichael Kruse <llvm@meinersbur.de>
Mon, 10 Aug 2015 12:28:52 +0000 (12:28 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Mon, 10 Aug 2015 12:28:52 +0000 (12:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244440 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/RegionInfoImpl.h

index b31eefc15f784ea43999eccc2fd056303272e826..38bc365b8b9f30fcd332888d94cbb1a8238dc644 100644 (file)
@@ -236,7 +236,7 @@ std::string RegionBase<Tr>::getNameStr() const {
 template <class Tr>
 void RegionBase<Tr>::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<Tr>::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<Tr>::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!");
     }
   }
 }