[PATCH] D103539: RISCV: adjust handling of relocation emission for RISCV

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 15 14:47:31 PDT 2021


MaskRay added inline comments.


================
Comment at: llvm/test/MC/RISCV/fixups-expr.s:2
 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+relax %s \
-# RUN:     | llvm-readobj -r - | FileCheck -check-prefix=RELAX %s
+# RUN:     | llvm-readobj -r - | FileCheck -check-prefix RELAX %s
 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=-relax %s \
----------------
Since you are switching the check-prefix styles...

The most common form is `--check-prefix=`


================
Comment at: llvm/test/MC/RISCV/hilo-constaddr-expr.s:12
 tmp2:
-# CHECK-RELAX: :[[@LINE+1]]:{{[0-9]+}}: error: expected relocatable expression
+# CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: expected relocatable expression
   lui t0, %hi(tmp3-tmp1)
----------------
MaskRay wrote:
> nit: `[[@` is deprecated. use `:[[#@LINE+1]]:[[#]]: error: ...`
I think it is useful to track the column information (`[[#]]` -> an integer). This ensures that the reported diagnostic makes sense.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103539/new/

https://reviews.llvm.org/D103539



More information about the llvm-commits mailing list