[PATCH] D142879: [RISCV] Emit relocation for uleb128

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 7 19:49:59 PDT 2023


MaskRay added a comment.

I am out of town for a few days, but I'll try to read this soon.



================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp:134
+
+  SMLoc Loc = Value->getLoc();
+
----------------
Only used once. Inline the variable where it is used.


================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp:138
+  unsigned PadTo = 0;
+
+  if (!Value->evaluateAsAbsolute(IntValue, getAssemblerPtr())) {
----------------
Delete blank line here. 


================
Comment at: llvm/test/MC/RISCV/fixups-expr-uleb128.s:18
+# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+relax \
+# RUN:         %s -riscv-enable-uleb128=false \
+# RUN:     | llvm-readobj -r - \
----------------
For a `cl::opt` option that defaults to false, we usually don't test the case when we explicitly set it to false. This additional case doesn't pull its weight.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142879



More information about the llvm-commits mailing list