forked from OSchip/llvm-project
Fix findCaseDest to return null when BB is both the default dest and one
of the numeric cases. llvm-svn: 30468
This commit is contained in:
parent
f23e3bfcb2
commit
86bda361b0
|
@ -1313,6 +1313,8 @@ public:
|
|||
/// findCaseDest - Finds the unique case value for a given successor. Returns
|
||||
/// null if the successor is not found, not unique, or is the default case.
|
||||
ConstantInt *findCaseDest(BasicBlock *BB) {
|
||||
if (BB == getDefaultDest()) return NULL;
|
||||
|
||||
ConstantInt *CI = NULL;
|
||||
for (unsigned i = 1, e = getNumCases(); i != e; ++i) {
|
||||
if (getSuccessor(i) == BB) {
|
||||
|
|
Loading…
Reference in New Issue