mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-08 12:21:04 +00:00
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. llvm-svn: 321878
This commit is contained in:
parent
a80ee75318
commit
c3b961a76a
@ -254,23 +254,23 @@ std::string RegionBase<Tr>::getNameStr() const {
|
||||
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(const RegionT *R) const {
|
||||
} 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user