mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 17:56:53 +00:00
Remove assert(false) in favor of asserting the if conditional it is contained within.
Also adjust the code to avoid 3 redundant map lookups. llvm-svn: 251327
This commit is contained in:
parent
b9c3f7822b
commit
a667b6ee3c
@ -649,18 +649,15 @@ bool llvm::canBeOmittedFromSymbolTable(const GlobalValue *GV) {
|
||||
static void collectFuncletMembers(
|
||||
DenseMap<const MachineBasicBlock *, int> &FuncletMembership, int Funclet,
|
||||
const MachineBasicBlock *MBB) {
|
||||
// Add this MBB to our funclet.
|
||||
auto P = FuncletMembership.insert(std::make_pair(MBB, Funclet));
|
||||
|
||||
// Don't revisit blocks.
|
||||
if (FuncletMembership.count(MBB) > 0) {
|
||||
if (FuncletMembership[MBB] != Funclet) {
|
||||
assert(false && "MBB is part of two funclets!");
|
||||
report_fatal_error("MBB is part of two funclets!");
|
||||
}
|
||||
if (!P.second) {
|
||||
assert(P.first->second == Funclet && "MBB is part of two funclets!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Add this MBB to our funclet.
|
||||
FuncletMembership[MBB] = Funclet;
|
||||
|
||||
bool IsReturn = false;
|
||||
int NumTerminators = 0;
|
||||
for (const MachineInstr &MI : MBB->terminators()) {
|
||||
|
Loading…
Reference in New Issue
Block a user