[llvm] r321878 - RegionInfo: Use report_fatal_error instead of llvm_unreachable
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 5 09:51:36 PST 2018
Author: arsenm
Date: Fri Jan 5 09:51:36 2018
New Revision: 321878
URL: http://llvm.org/viewvc/llvm-project?rev=321878&view=rev
Log:
RegionInfo: Use report_fatal_error instead of llvm_unreachable
Otherwise when using -verify-region-info in a release build the
error won't be emitted.
Modified:
llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h
Modified: llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h?rev=321878&r1=321877&r2=321878&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h (original)
+++ llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h Fri Jan 5 09:51:36 2018
@@ -254,23 +254,23 @@ std::string RegionBase<Tr>::getNameStr()
template <class Tr>
void RegionBase<Tr>::verifyBBInRegion(BlockT *BB) const {
if (!contains(BB))
- llvm_unreachable("Broken region found: enumerated BB not in region!");
+ report_fatal_error("Broken region found: enumerated BB not in region!");
BlockT *entry = getEntry(), *exit = getExit();
for (BlockT *Succ :
make_range(BlockTraits::child_begin(BB), BlockTraits::child_end(BB))) {
if (!contains(Succ) && exit != Succ)
- llvm_unreachable("Broken region found: edges leaving the region must go "
- "to the exit node!");
+ report_fatal_error("Broken region found: edges leaving the region must go "
+ "to the exit node!");
}
if (entry != BB) {
for (BlockT *Pred : make_range(InvBlockTraits::child_begin(BB),
InvBlockTraits::child_end(BB))) {
if (!contains(Pred))
- llvm_unreachable("Broken region found: edges entering the region must "
- "go to the entry node!");
+ report_fatal_error("Broken region found: edges entering the region must "
+ "go to the entry node!");
}
}
}
@@ -557,7 +557,7 @@ void RegionInfoBase<Tr>::verifyBBMap(con
} else {
BlockT *BB = Element->template getNodeAs<BlockT>();
if (getRegionFor(BB) != R)
- llvm_unreachable("BB map does not match region nesting");
+ report_fatal_error("BB map does not match region nesting");
}
}
}
More information about the llvm-commits
mailing list