[MC] Delete unnecessary diagnostic: "No relocation available to represent this relati...
authorFangrui Song <maskray@google.com>
Mon, 19 Aug 2019 07:59:35 +0000 (07:59 +0000)
committerFangrui Song <maskray@google.com>
Mon, 19 Aug 2019 07:59:35 +0000 (07:59 +0000)
commitb127771f7d2972acad81550e03cc4e1e3c1fcd1c
treeca68aa6c0f3f45031865a050da20a367fedf4979
parent17587b36d1928c3399d4d9af6daa052c0cdd6327
[MC] Delete unnecessary diagnostic: "No relocation available to represent this relative expression"

Replace

- error: No relocation available to represent this relative expression

with

+ error: symbol 'undef' can not be undefined in a subtraction expression

or

+ error: Cannot represent a difference across sections

Keep !IsPcRel as an assertion after the two diagnostic checks are done.

llvm-svn: 369239
llvm/lib/MC/ELFObjectWriter.cpp
llvm/test/MC/AArch64/adr-diagnostics.s
llvm/test/MC/AArch64/error-location.s
llvm/test/MC/ARM/error-location.s
llvm/test/MC/ELF/bad-expr2.s