[llvm-reduce] Fix invalid reduction in basic-blocks delta pass
Previously, if the basic-blocks delta pass tried to remove a basic block that was the last basic block in a function that did not have external or weak linkage, the resulting IR would become invalid. Since removing the last basic block in a function is effectively identical to removing the function body itself, we check explicitly for this case and if we detect it, we run the same logic as in ReduceFunctionBodies.cpp Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D113486
parent
a5d6dcbb
Please register or sign in to comment