[lld] [lld][macho] Support 1-byte branch relocs for x86_64 (PR #164439)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Oct 21 12:23:12 PDT 2025
    
    
  
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- lld/MachO/Arch/X86_64.cpp lld/MachO/InputFiles.cpp lld/MachO/Relocations.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lld/MachO/Arch/X86_64.cpp b/lld/MachO/Arch/X86_64.cpp
index 5d69c5dee..4292cd8d6 100644
--- a/lld/MachO/Arch/X86_64.cpp
+++ b/lld/MachO/Arch/X86_64.cpp
@@ -92,8 +92,8 @@ int64_t X86_64::getEmbeddedAddend(MemoryBufferRef mb, uint64_t offset,
     addend = static_cast<int32_t>(read32le(loc));
     break;
   case 3:
-     addend = read64le(loc);
-     break;
+    addend = read64le(loc);
+    break;
   default:
     llvm_unreachable("invalid r_length");
   }
``````````
</details>
https://github.com/llvm/llvm-project/pull/164439
    
    
More information about the llvm-commits
mailing list