]> granicus.if.org Git - llvm/commit
[RISCV] Make RISCVELFObjectWriter::getRelocType check IsPCRel
authorAlex Bradbury <asb@lowrisc.org>
Tue, 16 Jul 2019 03:47:34 +0000 (03:47 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Tue, 16 Jul 2019 03:47:34 +0000 (03:47 +0000)
commita907fae2e3303bd52a87df3d754de2fbd582b0c8
treee87602a3890f684255e546c98319baf20c311d83
parentb9b89d475a7363ce0979f11dbce5ff5c8d3bfa77
[RISCV] Make RISCVELFObjectWriter::getRelocType check IsPCRel

Previously, this function didn't check the IsPCRel argument. But doing so is a
useful check for errors, and also seemingly necessary for FK_Data_4 (which we
produce a R_RISCV_32_PCREL relocation for if IsPCRel).

Other than R_RISCV_32_PCREL, this should be NFC. Future exception handling
related patches will include tests that capture this behaviour.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366172 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp