LLVM/project 6f3b053 — llvm/docs TestingGuide.md

docs: Document to discard unused outputs from tests

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+21-0llvm/docs/TestingGuide.md
+21-01 files

LLVM/project c41d534 — clang/include/clang/Parse Parser.h, clang/include/clang/Sema DeclSpec.h

[BoundsSafety][NFC] Hold LateParsedTypeAttrInfo in declarator late-attribute lists (#239050)

Make DeclSpec, Declarator and DeclaratorChunk hold a SmallVector of
LateParsedTypeAttrInfo * instead of a LateParsedAttrList.

LateParsedAttrList has inline storage for two pointers plus flags, which
makes DeclaratorChunk larger. That may have caused the compile-time
regression in #238909. The new list has no inline storage.

Sema also only has the definition of LateParsedTypeAttrInfo, not of
LateParsedAttribute. Holding the former lets Sema build the type
directly, without a callback into the parser.

No functional change: nothing populates or reads these lists yet.

Assisted-by: Sonnet 5.5
DeltaFile
+16-13clang/include/clang/Sema/DeclSpec.h
+6-5clang/include/clang/Parse/Parser.h
+4-4clang/lib/Parse/ParseDecl.cpp
+26-223 files

LLVM/project 1a749d5 — flang CMakeLists.txt, llvm/cmake/modules AddLLVM.cmake HandleLLVMOptions.cmake

[CMake] Apply LLVM warning policy per target instead of via CMAKE_<LANG>_FLAGS

HandleLLVMOptions.cmake appends LLVM's warning, suppression and `-Werror`
options to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS`. Those are language-wide, so
every target in the build tree inherits LLVM's diagnostic policy, including
unrelated projects embedded next to LLVM (`LLVM_EXTERNAL_PROJECTS`,
`add_subdirectory`) and third-party code, even if they only link an LLVM
library. LLVM's policy prefers, for example, exhaustive enum switches without
`default` and enables `-Wcovered-switch-default` accordingly; a project with
a different style should not have that imposed on it just because it shares a
build tree.

The policy is now collected in `LLVM_WARNING_OPTIONS_C/CXX` lists and attached
as `PRIVATE` compile options by `llvm_update_compile_flags()`, so it applies to
targets made with `llvm_add_library`, `add_llvm_executable`, tablegen tools,
plugins and unit tests, but is not exported and does not reach consumers.
`llvm_apply_warning_options(<target>)` lets other LLVM-owned targets opt in.
Subprojects that adjust the policy should use `llvm_add_warning_options()`
rather than append to `CMAKE_<LANG>_FLAGS`, which now precedes LLVM's options

    [25 lines not shown]
DeltaFile
+93-57llvm/cmake/modules/HandleLLVMOptions.cmake
+9-9llvm/lib/Testing/Support/CMakeLists.txt
+15-0llvm/docs/ReleaseNotes.md
+13-0llvm/cmake/modules/AddLLVM.cmake
+6-6flang/CMakeLists.txt
+9-0runtimes/CMakeLists.txt
+145-7212 files not shown
+174-8318 files

LLVM/project 418f5ca — libc/docs abi_policy.md design_philosophy.md, libc/docs/dev patterns_to_avoid.md testing_guide.md

[libc] Major docs refresh (#241609)

This was made as an attempt to write down as much of what I know about
LLVM-libc as possible. The process involved using an LLM agent to
interview me about what wasn't clear from the codebase and then write
docs based on my answers. After that were several rounds of revisions
where I tweaked phrasing and corrected more issues. The final documents
are an accurate reflection of my understanding of the state of
LLVM-libc.

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+233-0libc/docs/dev/implementation_guidelines.md
+205-0libc/docs/dev/code_organization.md
+194-0libc/docs/design_philosophy.md
+179-0libc/docs/dev/testing_guide.md
+171-0libc/docs/abi_policy.md
+85-0libc/docs/dev/patterns_to_avoid.md
+1,067-019 files not shown
+1,444-6525 files

LLVM/project d11ab06 — offload/liboffload/plugins/amdgpu/src AMDGPUDeviceOptions.h, offload/test/env amdgpu_device_options.c

[Offload][AMDGPU] Set SDMA for AMDGPU (#241577)

Following https://github.com/llvm/llvm-project/pull/239816, apply the
SDMA value that we current used downstream. It will make the
configuration more consistent between upstream/downstream.
DeltaFile
+44-0offload/test/env/amdgpu_device_options.c
+2-0offload/liboffload/plugins/amdgpu/src/AMDGPUDeviceOptions.h
+46-02 files

LLVM/project 165a272 — llvm/unittests/Support SpecialCaseListTest.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+10-0llvm/unittests/Support/SpecialCaseListTest.cpp
+10-01 files

LLVM/project 3f118a5 — llvm/lib/TargetParser Triple.cpp, llvm/test/TableGen RuntimeLibcallEmitter-attributes.td

RuntimeLibcalls: Drop errno effects on targets without math errno

Teach the triple about targets which never support writing errno from
math functions. This is distinct from clang's -fno-math-errno default,
which is also enabled on some targets whose libm can set errno, such
as NetBSD. In the future we could add a no-math-errno module flag, but
that would exacerbate an existing bug where linking a -fno-math-errno
TU into a -fmath-errno TU will implicitly take the first linked
module's setting.

To do this make math errno a separate libcall property instead of
directly encoding it in the memory effects. This is necessary because
of non-math errno users.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+234-238llvm/test/Transforms/Util/DeclareRuntimeLibcalls/bsd.ll
+196-200llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+36-13llvm/test/TableGen/RuntimeLibcallEmitter-attributes.td
+40-0llvm/unittests/TargetParser/TripleTest.cpp
+23-13llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
+33-0llvm/lib/TargetParser/Triple.cpp
+562-4646 files not shown
+592-47712 files

LLVM/project 653dddd — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls systemz.ll ppc.ll

RuntimeLibcalls: Mark noreturn and pure helper libcalls (#241627)

Mark the functions which never return as noreturn. Add some nounwind
and cold, mostly following inferLibFuncAttributes. Mark
misc. functions as pure.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+45-22llvm/include/llvm/IR/RuntimeLibcalls.td
+15-10llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+12-8llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
+9-6llvm/test/Transforms/Util/DeclareRuntimeLibcalls/ppc.ll
+9-6llvm/test/Transforms/Util/DeclareRuntimeLibcalls/bsd.ll
+6-4llvm/test/Transforms/Util/DeclareRuntimeLibcalls/systemz.ll
+96-5610 files not shown
+140-8516 files

LLVM/project a3bb937 — utils/bazel/llvm-project-overlay/llvm BUILD.bazel

[Bazel] Fixes c9a8614 (#244450)

This fixes c9a86145188df70bca9733bbee77736c53372e27 (#242436).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=c9a86145188df70bca9733bbee77736c53372e27

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+2-0utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+2-01 files

LLVM/project b39ffc3 — llvm/test/CodeGen/X86/apx reloc-opt.ll

[X86][APX] Test the relocation of an NF add

test_regclass_not_updated_by_regalloc_2 only produced an NDD/NF add
with a GOT operand because the allocator happened to give the add a
destination different from its source. With SlotIndexes compaction it
picks the same register, so the add is compressed to the legacy form
and the CODE_6 TODO lost its test.

Add a function whose add keeps its source live, so it stays NDD and
becomes NF under any allocation.
DeltaFile
+20-1llvm/test/CodeGen/X86/apx/reloc-opt.ll
+20-11 files

LLVM/project 9d74c5e — llvm/test/CodeGen/X86 vector-interleaved-store-i64-stride-7.ll vector-deinterleave8-i64.ll

[X86] Enable SlotIndexes compaction by default

Compacting SlotIndexes before greedy allocation drops the entries of
erased instructions, so live range sizes and instruction distances
reflect the code being allocated rather than how much was erased
before it. AMDGPU has done this since #235806; do the same for X86.

Codegen changes only through allocation: no new crashes, verifier
errors or allocation failures in the lit suites, including
EXPENSIVE_CHECKS, and a stage-2 build of LLVM, clang and lld with
-verify-machineinstrs passes its own tests. On llvm-test-suite at -O3,
spills drop 0.3% and .text 0.06%, with compile time unchanged.

Most test updates are regenerated checks. misched-matmul now inserts
20 spills instead of 24. live-debug-vars-stale-slotindexes.mir gets
one more use of %27 so that accumulate_fit still reaches the stale
index path it was written for.
DeltaFile
+20,796-20,889llvm/test/CodeGen/X86/vector-interleave7-i16.ll
+17,854-17,989llvm/test/CodeGen/X86/vector-interleave7-i32.ll
+17,166-17,229llvm/test/CodeGen/X86/vector-interleave6-i16.ll
+15,403-15,465llvm/test/CodeGen/X86/vector-interleaved-load-i64-stride-7.ll
+13,897-13,898llvm/test/CodeGen/X86/vector-deinterleave8-i64.ll
+13,329-13,243llvm/test/CodeGen/X86/vector-interleaved-store-i64-stride-7.ll
+98,445-98,713512 files not shown
+675,166-677,705518 files

LLVM/project 927a56d — llvm/lib/Target/AArch64 AArch64ISelDAGToDAG.cpp, llvm/test/CodeGen/AArch64 pdep.ll rem-by-const.ll

[AArch64] Avoid folding SRA/SRL into ALU when it can be folded with SHL/AND (#234737)

For the following function
```
int f(int a, int b) {
  b -= (a<<26)>>29;
  return b;
}
```
LLVM currently generates
```
f:
    lsl w8, w0, #26
    sub w0, w1, w8, asr #29
    ret
```

However, if we don't fold the `asr` into the `sub`, the `asr` can be
folded with the `lsl` instead, and we can avoid generating the

    [10 lines not shown]
DeltaFile
+527-528llvm/test/CodeGen/AArch64/clmul.ll
+121-107llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
+70-70llvm/test/CodeGen/AArch64/pext.ll
+114-0llvm/test/CodeGen/AArch64/alu-shr-shl.ll
+32-60llvm/test/CodeGen/AArch64/rem-by-const.ll
+21-21llvm/test/CodeGen/AArch64/pdep.ll
+885-7869 files not shown
+913-81415 files

LLVM/project e587562 — llvm/lib/CodeGen RegisterCoalescer.cpp, llvm/test/CodeGen/AMDGPU coalescer-subreg-implicit-def-phi-input.mir

Renumber subranges after removing pruned values
DeltaFile
+8-1llvm/lib/CodeGen/RegisterCoalescer.cpp
+1-1llvm/test/CodeGen/X86/coalescer-subreg-implicit-def-phi-input.mir
+1-1llvm/test/CodeGen/AMDGPU/coalescer-subreg-implicit-def-phi-input.mir
+10-33 files

LLVM/project d80ea91 — clang/include/clang/Analysis/Analyses ThreadSafetyTraverse.h

[clang] fixup -Wunused-private-field (#244427)

-Wunused-private-field will soon be able to flag fields in instantiated
class templates. Land this in preparation.

Link: #237374
Link: #244396
DeltaFile
+1-8clang/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h
+1-81 files

LLVM/project 401c5de — llvm/lib/CodeGen RegisterCoalescer.cpp LiveInterval.cpp, llvm/test/CodeGen/X86 coalescer-subreg-implicit-def-phi-input.mir

RegisterCoalescer: Drop unused value numbers after joining

Erasing a pruned IMPLICIT_DEF marks its value number unused but leaves
it in NewVNInfo, and LiveRange::join only skipped null entries, so the
joined range kept a dead value number. Skip unused entries in join and
size valnos to the number actually kept. pruneSubRegValues similarly
only marked the pruned subrange value unused, so remove it instead.

The resulting live intervals now will have the same value numbers as a
fresh LiveIntervals computation.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+2-3llvm/lib/CodeGen/LiveInterval.cpp
+2-2llvm/lib/CodeGen/RegisterCoalescer.cpp
+1-1llvm/test/CodeGen/X86/coalescer-subreg-implicit-def-phi-input.mir
+5-63 files

LLVM/project 848c54a — llvm/test/Transforms/Util/DeclareRuntimeLibcalls systemz.ll sparc.ll

RuntimeLibcalls: Add attributes to fenv libcalls

Treat the fp environment as inaccessible memory.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+25-20llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+20-16llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
+15-12llvm/test/Transforms/Util/DeclareRuntimeLibcalls/ppc.ll
+15-12llvm/test/Transforms/Util/DeclareRuntimeLibcalls/bsd.ll
+10-8llvm/test/Transforms/Util/DeclareRuntimeLibcalls/systemz.ll
+10-8llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sparc.ll
+95-7610 files not shown
+171-13216 files

LLVM/project 81e4276 — llvm/include/llvm/Analysis TargetTransformInfo.h, llvm/include/llvm/CodeGen BasicTTIImpl.h

[TTI] Return zero when query getRegUsageForType() with invalid type. (#243811)

This patch makes `getRegUsageForType()` returns 0 when the type is
invalid.

With this changes, we can remove the type legalization check for
scalable vector (`isElementTypeLegalForScalableVector()`) in the
VPlan-based register model. This allows `i1` scalable vector for RISC-V
can be calculated.

The reason that we don't want to accept `i1` in the
`isElementTypeLegalForScalableVector()` in RISC-V is because this
function also being used to decide if the loop can be scalable
vectorized and RISC-V don't support scalable `i1` vector load/store.

This patch partially fixes
https://github.com/llvm/llvm-project/issues/243706.
The register spill count is close to the generated assembly.

Pruned the test case with AI assistance.
DeltaFile
+186-0llvm/test/Transforms/LoopVectorize/RISCV/reg-usage.ll
+1-3llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
+2-1llvm/include/llvm/Analysis/TargetTransformInfo.h
+2-0llvm/include/llvm/CodeGen/BasicTTIImpl.h
+191-44 files

LLVM/project 294b0a0 — libc/src/__support str_to_float.h, libc/src/__support/FPUtil FEnvImpl.h

[libc] Fix strtof128_test and GPU shared str_to_float build failures (#244436)

Fix two post-merge buildbot failures after #243955:

1. Define the fallback `float128` alias in `strtof128_test.cpp` when
`LIBC_TYPES_HAS_NATIVE_FLOAT128` is not set (e.g. Clang < 18.1 on
x86_64).
2. Avoid pulling `FPUtil/float128.h` (and transitively `FEnvImpl.h`)
into `str_to_float.h` by turning `ClingerConsts<fputil::Float128>` into
a dependent partial specialization, and undefine
`LIBC_MATH_USE_SYSTEM_FENV` on `LIBC_TARGET_ARCH_IS_GPU` in `FEnvImpl.h`
since GPU targets do not provide system `<fenv.h>` functions.

Also clean up direct includes and sync CMake and Bazel dependencies.

Assisted-by: Gemini
DeltaFile
+90-85libc/src/__support/str_to_float.h
+10-4libc/src/__support/FPUtil/FEnvImpl.h
+7-0libc/test/src/stdlib/strtof128_test.cpp
+3-3libc/src/stdlib/strtof128.h
+3-1libc/src/stdlib/CMakeLists.txt
+3-0utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel
+116-936 files not shown
+127-9812 files

LLVM/project b58d895 — llvm/include/llvm/IR RuntimeLibcallsImpl.td RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls ppc.ll

RuntimeLibcalls: Add attributes to libc libcalls

Annotate C library functions with the attributes InferFunctionAttrs
gives. This isn't fully captured in the DeclareRuntimeLibcalls testing
because not all of these functions are yet associated with a library.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+1,074-184llvm/include/llvm/IR/RuntimeLibcalls.td
+12-12llvm/test/Transforms/Util/DeclareRuntimeLibcalls/ppc.ll
+1-0llvm/include/llvm/IR/RuntimeLibcallsImpl.td
+1,087-1963 files

LLVM/project cb12af6 — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls hexagon.ll arm64ec.ll

RuntimeLibcalls: Add attributes to target memory helper libcalls

Annotate the various target specific memcpy-like functions with known
alignments.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+50-33llvm/include/llvm/IR/RuntimeLibcalls.td
+16-16llvm/test/Transforms/Util/DeclareRuntimeLibcalls/arm.ll
+15-15llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+7-7llvm/test/Transforms/Util/DeclareRuntimeLibcalls/codegen-opt-flags.ll
+3-3llvm/test/Transforms/Util/DeclareRuntimeLibcalls/arm64ec.ll
+2-2llvm/test/Transforms/Util/DeclareRuntimeLibcalls/hexagon.ll
+93-766 files

LLVM/project 125327e — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls arm.ll ppc.ll

RuntimeLibcalls: Mark noreturn and pure helper libcalls

Mark the functions which never return as noreturn. Add some nounwind
and cold, mostly following inferLibFuncAttributes. Mark
misc. functions as pure.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+45-22llvm/include/llvm/IR/RuntimeLibcalls.td
+15-10llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+12-8llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
+9-6llvm/test/Transforms/Util/DeclareRuntimeLibcalls/ppc.ll
+9-6llvm/test/Transforms/Util/DeclareRuntimeLibcalls/bsd.ll
+6-4llvm/test/Transforms/Util/DeclareRuntimeLibcalls/arm.ll
+96-5610 files not shown
+140-8516 files

LLVM/project 63c34b3 — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls sparc.ll bsd.ll

RuntimeLibcalls: Add attributes inferLibFuncAttributes gives libcalls (#241618)

Remove more differences with the attributes the InferFunctionAttrs
pass would add to the declared libcalls.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+88-77llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+71-63llvm/test/Transforms/Util/DeclareRuntimeLibcalls/ppc.ll
+67-59llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
+57-51llvm/test/Transforms/Util/DeclareRuntimeLibcalls/bsd.ll
+63-14llvm/include/llvm/IR/RuntimeLibcalls.td
+40-36llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sparc.ll
+386-30019 files not shown
+697-57025 files

LLVM/project f0e8a7b — llvm/include/llvm/Support Path.h PrefixMapper.h, llvm/lib/Support Path.cpp PrefixMapper.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+474-0llvm/unittests/Support/PrefixMapperTest.cpp
+166-0llvm/lib/Support/PrefixMapper.cpp
+149-0llvm/include/llvm/Support/PrefixMapper.h
+46-7llvm/unittests/Support/Path.cpp
+32-2llvm/include/llvm/Support/Path.h
+14-15llvm/lib/Support/Path.cpp
+881-244 files not shown
+898-2410 files

LLVM/project 3409953 — llvm/include/llvm/Support PrefixMapper.h, llvm/lib/Support CMakeLists.txt PrefixMapper.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+447-0llvm/unittests/Support/PrefixMapperTest.cpp
+190-0llvm/lib/Support/PrefixMapper.cpp
+151-0llvm/include/llvm/Support/PrefixMapper.h
+1-0llvm/unittests/Support/CMakeLists.txt
+1-0llvm/lib/Support/CMakeLists.txt
+790-05 files

LLVM/project 25e3839 — lldb/source/Plugins/ObjectFile/PECOFF ObjectFilePECOFF.h ObjectFilePECOFF.cpp, lldb/test/Shell/ObjectFile/PECOFF module-from-memory-header-only.yaml

[lldb] Don't crash on a PE image read from memory that llvm::object rejects (#241902)

ObjectFilePECOFF::CreateMemoryInstance builds an object file from the
512 bytes lldb reads at a module's header address. ParseHeader can parse
the headers and section table from that, but
llvm::object::COFFObjectFile often can't; the export table and other
data directories point past the end of the buffer. CreateInstance
rejects a file whose binary can't be created, but CreateMemoryInstance
keeps the object, and m_binary stays null.

ParseSymtab, GetSectionDataSize and GetTlsIndexAddress dereference
m_binary without checking it. Loading such a module makes lldb look for
its symbol file, which parses the symbol table and crashes in
AppendFromExportTable. Check the binary there, as GetUUID and
ParseDependentModules already do.

Meta hit this with a Linux core of a .NET process. .NET assemblies are
PE files, the process maps them as plain files, and the core saved the
first page of one of them. Creating a module from that memory with

    [3 lines not shown]
DeltaFile
+49-0lldb/test/Shell/ObjectFile/PECOFF/module-from-memory-header-only.yaml
+12-2lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+1-1lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
+62-33 files

LLVM/project 647d0b7 — llvm/lib/Transforms/Vectorize VectorCombine.cpp, llvm/test/Transforms/VectorCombine deinterleave-interleave-tree.ll

[VectorCombine] Loosen one-use rule in interleave of deinterleave combine
DeltaFile
+120-0llvm/test/Transforms/VectorCombine/deinterleave-interleave-tree.ll
+47-23llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+167-232 files

LLVM/project c2efb08 — llvm/lib/DWARFLinker/Classic DWARFLinkerDeclContext.cpp, llvm/test/tools/dsymutil/Inputs compilation-prefix-map-odr.s

[dsymutil] Undo prefix mapping before resolving paths for ODR uniquing (#242437)

The classic linker resolves the declaration file of a type with
realpath() to tell apart types with the same name, line and size. For
paths remapped by compilation caching, which don't exist on disk,
realpath() fails and only the file name is left, so different types
declared in headers with the same name in different directories were
merged. Undo the prefix mapping from compilation-prefix-map.json first.
DeltaFile
+679-0llvm/test/tools/dsymutil/Inputs/compilation-prefix-map-odr.s
+47-0llvm/test/tools/dsymutil/X86/compilation-prefix-map-odr.test
+3-0llvm/lib/DWARFLinker/Classic/DWARFLinkerDeclContext.cpp
+729-03 files

LLVM/project c9a8614 — llvm/lib/DWARFLinker/Classic DWARFLinker.cpp, llvm/test/tools/dsymutil/Inputs swift-interface-prefix-map.s compilation-prefix-map.s

[dsymutil] Support compilation-prefix-map.json from compilation caching (#242436)

Compilation caching can prefix map the paths that the compiler sees, so
that cache keys don't depend on where the build happens, for example
/path/to/project becomes /^src. The build system records the mapping in
a compilation-prefix-map.json file in a parent directory of the object
files, as a JSON object from each remapped prefix to the original one.

dsymutil didn't support it, so it used the remapped paths from the
debug info as is: it failed to copy the Swift interfaces that the debug
info refers to, didn't recognize interfaces from the SDK or the
toolchain that it should skip, and wrote the remapped paths into the
dSYM.

Load the compilation-prefix-map.json closest to each object file, and
use it to find Swift interfaces and Clang modules, and to restore the
original paths in the path attributes and line tables of the linked
debug info. Clang modules use the map of the object file that refers to
them. -object-prefix-map still only applies to looking up Clang

    [5 lines not shown]
DeltaFile
+349-0llvm/test/tools/dsymutil/Inputs/compilation-prefix-map.s
+262-0llvm/test/tools/dsymutil/Inputs/swift-interface-prefix-map.s
+70-0llvm/test/tools/dsymutil/X86/swift-interface-prefix-map.test
+58-0llvm/test/tools/dsymutil/X86/compilation-prefix-map.test
+52-0llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
+36-14llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
+827-1412 files not shown
+972-5718 files

LLVM/project 5ed35df — llvm/include/llvm/Support VirtualFileSystem.h, llvm/lib/Support VirtualFileSystem.cpp

[Support] Add vfs::findFileInParentDirectories() (#242492)

Several tools look for a file in a directory and its parent
directories, for example clang-format for .clang-format and clang-tidy
for .clang-tidy, and each has its own loop for that. Add a function for
it, which dsymutil will use to find the compilation-prefix-map.json
files that compilation caching writes.
DeltaFile
+30-0llvm/unittests/Support/VirtualFileSystemTest.cpp
+16-0llvm/lib/Support/VirtualFileSystem.cpp
+11-0llvm/include/llvm/Support/VirtualFileSystem.h
+57-03 files

LLVM/project 1445330 — llvm/include/llvm/Support PrefixMapper.h, llvm/lib/Support CMakeLists.txt PrefixMapper.cpp

[Support] Add PrefixMapper (#242491)

Add a utility for remapping path prefixes, along with MappedPrefix for
parsing "old=new" mappings. Mappings are matched on whole path
components and respect the configured path style, so Windows paths are
matched case- and separator-insensitively.

This will be used by dsymutil to undo the path prefix mapping applied
by compilation caching.
DeltaFile
+447-0llvm/unittests/Support/PrefixMapperTest.cpp
+190-0llvm/lib/Support/PrefixMapper.cpp
+151-0llvm/include/llvm/Support/PrefixMapper.h
+1-0llvm/unittests/Support/CMakeLists.txt
+1-0llvm/lib/Support/CMakeLists.txt
+790-05 files