forked from OSchip/llvm-project
[BOLT] Allow jump tables with 2 entries
Summary: GCC 8 can generate jump tables with just 2 entries. Modify our heuristic to accept it. We still assert that there's more than one entry. (cherry picked from FBD8709416)
This commit is contained in:
parent
8835f90d1e
commit
6802948028
|
@ -867,8 +867,8 @@ IndirectBranchType BinaryFunction::processIndirectBranch(MCInst &Instruction,
|
|||
}
|
||||
if (Type == IndirectBranchType::POSSIBLE_JUMP_TABLE ||
|
||||
Type == IndirectBranchType::POSSIBLE_PIC_JUMP_TABLE) {
|
||||
assert(JTOffsetCandidates.size() > 2 &&
|
||||
"expected more than 2 jump table entries");
|
||||
assert(JTOffsetCandidates.size() > 1 &&
|
||||
"expected more than one jump table entry");
|
||||
|
||||
auto JumpTableName = generateJumpTableName(ArrayStart);
|
||||
auto JumpTableType =
|
||||
|
|
Loading…
Reference in New Issue