Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MC] Remove unneeded MCDataFragment check from AttemptToFoldSymbolOff…
…setDifference If FA == FB, we can use SA.getOffset() - SB.getOffset() even if FA is not a MCDataFragment, as the only case this can be problematic (different offsets for a variable-size fragment) is invalid/unreachable. If FA != FB, the `if (FI->getKind() != MCFragment::FT_Data)` check below can bail out correctly. This change will help Mach-O fold more expressions. For ELF this is NFC, unless evaluateFixup has a bug that would evaluate an expression differently.
- Loading branch information