mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Fix findCaseDest to return null when BB is both the default dest and one
of the numeric cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30468 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2ab804c607
commit
d791544c9f
@ -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…
x
Reference in New Issue
Block a user