[lld] [LLD][RISCV] Report error for unsatisfiable RISCV_ALIGN (PR #74121)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 10:17:52 PST 2023


MaskRay wrote:

I agree that an `errorOrWarn` is useful. `errorOrWarn` is generally better than `error` since it is recoverable with `--noinhibit-exec`.

> Second, this will report an error on each relax iteration. I explored trying to report an error only once after relaxation, but ended up deciding I didn't have the context to implement it safely.

Yes. An alternative is to store the message in a vector than report it in `riscvFinalizeRelax`, which may add quite some complexity. This error is for something that is badly broken, repeating it is probably fine.

https://github.com/llvm/llvm-project/pull/74121


More information about the llvm-commits mailing list