[MC] Restore a special case to support limited A-B folding when A/B are in the same...
authorFangrui Song <i@maskray.me>
Sat, 17 Jun 2023 00:08:58 +0000 (17:08 -0700)
committerFangrui Song <i@maskray.me>
Sat, 17 Jun 2023 00:08:58 +0000 (17:08 -0700)
commitdef6158f957e77d67f74aa9c8bb342c4b64a159b
tree256a68a74d7fa0000a5b4bc034448f527e25b44f
parent441108ccba948d76e7002c61236e3bcbca0203ce
[MC] Restore a special case to support limited A-B folding when A/B are in the same fragment being laided out

Add subsection-if.s to test what we can fold (in the same fragment) and what we cannot.

Fix https://github.com/ClangBuiltLinux/linux/issues/1876
Fixes: 4bdc7f7a331f82cca1637388cf68bdc5b32ab43b
llvm/lib/MC/MCExpr.cpp
llvm/test/MC/ELF/subsection-if.s [new file with mode: 0644]