[llvm] [LoongArch] Support R_LARCH_{ADD, SUB}_ULEB128 for .uleb128 and force relocs when sym is not in section (PR #76433)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 1 06:42:47 PST 2024


================
@@ -199,7 +199,7 @@ class MCAsmBackend {
   // Defined by linker relaxation targets to possibly emit LEB128 relocations
   // and set Value at the relocated location.
   virtual bool relaxLEB128(MCLEBFragment &LF, MCAsmLayout &Layout,
-                           int64_t &Value) const {
+                           int64_t &Value, bool &UseZeroPad) const {
----------------
MaskRay wrote:

Instead of an output parameter, make it part of the return value `pair<bool, bool>`.

The current code does not initialize `UseZeroPad` in all cases.

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


More information about the llvm-commits mailing list