Manual-sync mirror of chromium.googlesource.com/external/github.com/llvm/llvm-project (bare monorepo, no subtree suffix)
Find a file
Karim Alweheshy e44068cc12
[lld][MachO] Preserve class-address addends in ObjC category merging (#211431)
Mach-O category merging can encounter Swift class references as an
enclosing
metadata symbol plus a non-zero addend after LTO removes the exact
class-address alias. For example, a category can refer to a `CMf` symbol
plus
the offset of the class object within that metadata record.

`tryGetSymbolAtIsecOffset()` previously resolved such a relocation to
the
enclosing symbol and discarded the residual addend. `getClassRo()` then
read
the class layout at the wrong address. For valid Swift metadata this can
return
null; before the defensive check in the first commit the linker
dereferenced
that result and crashed, while the check alone safely skipped a category
that
could have been merged.

Preserve the class reference as a symbol and residual addend throughout:

- category grouping;
- class and metaclass RO-data lookup;
- source-language detection; and
- relocations synthesized for merged categories.

An exact symbol at the target address is still preferred. When no exact
alias
survives, retain the offset from the closest containing symbol. The
defensive
checks remain in place for genuinely incomplete or unsupported metadata.

The Swift regression now omits the exact class-address alias and points
the
category classlist directly into the enclosing metadata record, matching
the
shape observed after ThinLTO.

Testing:

- Release + assertions AArch64 LLVM/LLD build
- focused `llvm-lit` coverage for the alias-free Swift metadata and
  missing-metadata cases
- full Swift 6 application link with `-objc_category_merging`

The application result is integration evidence for correctness and
folding
coverage
2026-07-31 05:09:19 -07:00
.ci [premerge] Route macOS build through a monolithic script to enable Job Summary (#211565) 2026-07-29 04:38:31 +02:00
.github Revert "[github] Move BOLT reviewers to team (#211422)" (#213141) 2026-07-30 14:38:10 -07:00
bolt [BOLT] Fix RELR addend updates for non-zero image bases (#213000) 2026-07-30 23:03:38 +01:00
clang [clang][Analysis] Add argument accessors to clang::AnyCall (#212934) 2026-07-31 13:06:52 +01:00
clang-tools-extra [Clang] Treat line directives as header names. (#211512) 2026-07-29 19:04:17 +02:00
cmake Bump version to 24.0.0git (#209473) 2026-07-14 09:21:03 -04:00
compiler-rt [ubsan] Report specific CFI checks in UBSan summaries (#213224) 2026-07-31 10:56:15 +02:00
cross-project-tests [Clang][RISCV] Add packed pair byte intrinsics (#212589) 2026-07-30 02:24:02 +08:00
flang [flang][CodeGen] Replace fir.select* FIR-to-LLVM patterns with stubs that emit conversion errors (#212978) 2026-07-31 09:26:26 +02:00
flang-rt [flang-rt][cuda] Keep CUFDeviceIsActive working under runtime/driver skew (#212320) 2026-07-27 16:02:30 -07:00
libc [compiler-rt][builtins] libc-backed floating-point extend/trunct builtins (#209984) 2026-07-31 00:50:13 +00:00
libclc libclc: Fix signed 0 handling in sincospi (#211260) 2026-07-23 06:24:44 +02:00
libcxx [libc++abi] Add a clang-tidy config and test (#207324) 2026-07-31 13:26:27 +02:00
libcxxabi [libc++abi] Add a clang-tidy config and test (#207324) 2026-07-31 13:26:27 +02:00
libsycl [SYCL] Update SYCL to use the new liboffload allocation API (#212223) 2026-07-27 14:14:41 +02:00
libunwind [WebAssembly] Call EH personality function instead of Unwind_CallPersonality (#209282) 2026-07-28 20:05:45 -07:00
lld [lld][MachO] Preserve class-address addends in ObjC category merging (#211431) 2026-07-31 05:09:19 -07:00
lldb [lldb] Only preload a Module's symbols once (#213094) 2026-07-31 11:49:30 +02:00
llvm [SLP][NFC]Add some extra tests for reductions, NFC 2026-07-31 08:04:07 -04:00
llvm-libgcc [docs] Finish misc MyST migration (#210209) 2026-07-17 11:56:59 -07:00
mlir [mlir][NVVM] Add memory clobber support to inline_ptx and BasicPtxBui… (#212937) 2026-07-31 10:38:13 +02:00
offload [OpenMP][Offload] Fix use-after-free of the packed firstprivate transfer buffer (#212905) 2026-07-30 16:17:20 -07:00
openmp [OpenMP][offload] Fix Global addrspace (#212529) 2026-07-28 16:16:31 +00:00
orc-rt [orc-rt] Reorder wrapper-fn args to trailing-callback style. (#212243) 2026-07-28 17:14:30 +10:00
polly [SCEV] Remove ptrtoint expression (NFC). (#212038) 2026-07-26 21:28:16 +01:00
runtimes Remove debug leftovers (#211068) 2026-07-21 23:23:13 -07:00
third-party [benchmark] Back port 2b0bff7 from upstream (#212278) 2026-07-29 21:37:13 +08:00
utils [Bazel] Fixes 21d9869 (#213147) 2026-07-30 16:29:41 -05:00
.clang-format
.clang-format-ignore [Docs] Update coding standard for TD files (#200848) 2026-06-01 21:35:58 +01:00
.clang-tidy Add default empty header filter regex to root .clang-tidy (#167386) 2025-11-11 01:36:25 +03:00
.git-blame-ignore-revs Add "Split clang/lib/CodeGen/CGBuiltin.cpp" to .git-blame-ignore-revs (#203419) 2026-06-12 12:03:28 +01:00
.gitattributes [libclang/python] Enable packaging clang python bindings (#125806) 2025-11-24 17:21:24 -08:00
.gitignore gitignore: Add emacs lock files (#205055) 2026-06-22 18:19:29 +02:00
.mailmap mailmap: Add entries for Peter Collingbourne. (#210526) 2026-07-18 11:02:06 -07:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE.TXT
pyproject.toml [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
README.md [libc++] Rename pre-commit CI workflows (#211844) 2026-07-24 14:56:19 -04:00
SECURITY.md [SECURITY.md] add pointers to "what is a security issue" (#177372) 2026-01-22 17:19:09 -07:00

The LLVM Compiler Infrastructure

OpenSSF Scorecard OpenSSF Best Practices libc++

Welcome to the LLVM project!

This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.

The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.

C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.

Other components include: the libc++ C++ standard library, the LLD linker, and more.

Getting the Source Code and Building LLVM

Consult the Getting Started with LLVM page for information on building and running LLVM.

For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.

Getting in touch

Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.

The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.