LLVM/project cc8549dllvm/lib/Transforms/Vectorize VPlan.h

[VPlan] Remove unused InductionDescriptor VPDerivedIVRecipe constructor (#206583)

Both callers use the 5-argument (Kind, FPBinOp, ...) constructor; the
delegating InductionDescriptor overload has no users.
DeltaFile
+0-7llvm/lib/Transforms/Vectorize/VPlan.h
+0-71 files

LLVM/project d5e975dflang/lib/Semantics openmp-utils.cpp

[flang][OpenMP] Add explicit return type to visitor lambdas (#206588)

This should silence MSVC (14.51.36231) error:
error C2338: static assertion failed: 'visit() requires the result of
all potential invocations to have the same type and value category
(N4950 [variant.visit]/5).'

e.g. https://lab.llvm.org/buildbot/#/builders/166/builds/9664
DeltaFile
+4-2flang/lib/Semantics/openmp-utils.cpp
+4-21 files

LLVM/project 8cf09c5lldb/include/lldb/Core BugReporter.h, lldb/source/Commands CommandObjectDiagnostics.cpp

[lldb] Add a BugReporter plugin type and "diagnostics report" (#206578)

Introduce a BugReporter plugin kind that files an assembled
Diagnostics::Report through a pluggable destination, plus a "diagnostics
report" command (aliased "bugreport") that collects the bundle and files
it through the first registered reporter.

CreateBugReporterInstance() returns the first registered reporter, so a
reporter registered earlier wins and a downstream tree can take over by
registering ahead of the built-ins. BugReporterNone is the
always-registered, last-in-order fallback. Its File() returns an error
pointing at LLDB_BUG_REPORT_URL, so the command surfaces "no tracker
configured" through the normal error path instead of special-casing it.

"diagnostics report" writes the bundle, prints a review warning, and
files it unless --no-open is given. The upcoming GitHub reporter, gated
by a CMake option, is the first real destination.
DeltaFile
+120-0lldb/source/Commands/CommandObjectDiagnostics.cpp
+52-0lldb/source/Core/PluginManager.cpp
+34-0lldb/source/Plugins/BugReporter/None/BugReporterNone.cpp
+32-0lldb/source/Plugins/BugReporter/None/BugReporterNone.h
+29-0lldb/include/lldb/Core/BugReporter.h
+26-0lldb/test/Shell/Diagnostics/TestReport.test
+293-08 files not shown
+340-014 files

LLVM/project 8fbed56llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlanTransforms.h

[VPlan] Pass CostCtx to makeMemOpWideningDecisions (NFC). (#206580)

makeMemOpWideningDecisions already uses 2 members (PSE, L) and will need
more in the future. Direcly pass CostCtx.
DeltaFile
+7-6llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-2llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+1-1llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+9-93 files

LLVM/project 78f4fe1llvm/test/CodeGen/AMDGPU target-cpu.ll

AMDGPU: Rewrite target-cpu test for new subarches

The function subtargets should now be a valid subtarget for
the top-level subarch.
DeltaFile
+52-74llvm/test/CodeGen/AMDGPU/target-cpu.ll
+52-741 files

LLVM/project b35d5b0llvm/unittests/CodeGen AMDGPUMetadataTest.cpp, llvm/unittests/CodeGen/GlobalISel GISelMITest.cpp

AMDGPU: Migrate unittests to subarch triples

Replace specifying a processor name with the triple
subarch.

The register-limit helpers in AMDGPUUnitTests.cpp that enumerate every
valid CPU via fillValidArchListAMDGCN still pass the CPU explicitly, as
does the MC Disassembler smoke test (its C disassembler API derives the
subtarget from the CPU, not the triple subarch).

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+6-6llvm/unittests/MC/AMDGPU/DwarfRegMappings.cpp
+6-6llvm/unittests/Target/AMDGPU/DwarfRegMappings.cpp
+3-3llvm/unittests/CodeGen/AMDGPUMetadataTest.cpp
+2-2llvm/unittests/Target/AMDGPU/AMDGPUUnitTests.cpp
+2-2llvm/unittests/CodeGen/GlobalISel/GISelMITest.cpp
+2-2llvm/unittests/MC/AMDGPU/Disassembler.cpp
+21-2110 files not shown
+33-3316 files

LLVM/project 1d19c84clang/lib/Basic OffloadArch.cpp, clang/lib/Driver Driver.cpp

clang: Start using new amdgpu subarch triples

Fixup invocations using --target=amdgcn + -mcpu to introduce
the subarch in the triple.

For offload toolchains, a single toolchain is constructed for the
top level amdgpu architecture, and the effective triple is used for
target specific tool invocations.

The specifics of the resource directory layout are tbd. This does
try to find resources in the subarch named directory. The paths
are searched at toolchain creation time, so that does not work
when there are multiple subarches.

Fixes #154925
DeltaFile
+234-2clang/lib/Basic/OffloadArch.cpp
+59-59clang/test/Driver/offload-arch-translation-amdgpu.cu
+43-43clang/test/Driver/hip-phases.hip
+33-33clang/test/Driver/hip-binding.hip
+49-15clang/lib/Driver/ToolChains/CommonArgs.cpp
+43-12clang/lib/Driver/Driver.cpp
+461-164103 files not shown
+1,251-491109 files

LLVM/project 6b092c7llvm/test/CodeGen/AMDGPU directive-amdgcn-target-legacy-triples.ll directive-amdgcn-target.ll

AMDGPU: Migrate target id tests to use new subarch triples
DeltaFile
+239-0llvm/test/CodeGen/AMDGPU/directive-amdgcn-target-legacy-triples.ll
+0-239llvm/test/CodeGen/AMDGPU/directive-amdgcn-target.ll
+11-11llvm/test/CodeGen/AMDGPU/tid-mul-func-xnack-any-on-2.ll
+12-10llvm/test/CodeGen/AMDGPU/target-id-xnack-always-on.ll
+11-11llvm/test/CodeGen/AMDGPU/tid-mul-func-xnack-all-any.ll
+11-11llvm/test/CodeGen/AMDGPU/tid-mul-func-xnack-all-not-supported.ll
+284-2829 files not shown
+380-37815 files

LLVM/project 978c702clang/lib/Driver/ToolChains CommonArgs.cpp, clang/test/Driver amdgpu-mcpu.cl hip-sanitize-options.hip

clang/AMDGPU: Stop passing redundant -target-cpu to cc1

Now that the exact target is encoded in the triple's subarch field,
-target-cpu is redundant. This avoids polluting the resultant IR with
unwanted "target-cpu" attributes. The net result is the desired codegen
when compiling libraries for a major subarch and linking it into a
program compiled for a specific arch. e.g., compiling for "gfx9-generic"
would pollute the IR with "target-cpu"="gfx9-generic", so codegen
would ultimately be performed for the generic target even after
linking into the concrete gfx9 cpu. The specialization will now be
achieved by merging the triples without the linker or optimization
passes needing to fixup function attributes.
DeltaFile
+62-62clang/test/Driver/amdgpu-mcpu.cl
+26-26clang/test/Driver/hip-sanitize-options.hip
+20-10clang/lib/Driver/ToolChains/CommonArgs.cpp
+12-16clang/test/Driver/hip-rdc-device-only.hip
+24-0clang/test/Preprocessor/amdgpu-subarch-cc1-target-cpu.cl
+10-10clang/test/Driver/amdgpu-xnack-sramecc-flags.c
+154-12427 files not shown
+214-21133 files

LLVM/project 293acbeclang/lib/Basic/Targets AMDGPU.h AMDGPU.cpp, clang/test/Misc/target-invalid-cpu-note amdgcn.c

clang/AMDGPU: Validate -target-cpu in cc1 is valid for the subarch

Restrict the reported list of valid target-cpus based on the triple's
subarch. This is more consistent with how other targets validate the
target CPU name. Currently we have split handling validating the target
name for the triple in both the driver and here. The driver based diagnostic
seems to be an amdgpu-ism in 2 different places (though there is one arm
validation emitting the same diagnostic). In the future we could probably
drop those.
DeltaFile
+55-0clang/test/Misc/target-invalid-cpu-note/amdgcn.c
+6-5clang/lib/Basic/Targets/AMDGPU.h
+1-1clang/lib/Basic/Targets/AMDGPU.cpp
+62-63 files

LLVM/project 1907423llvm/docs AMDGPUUsage.rst, llvm/lib/TargetParser AMDGPUTargetParser.cpp Triple.cpp

AMDGPU: Introduce amdgpu triple arch

Move towards using the triple for representing incompatible
ISA changes. Use the subarch field to represent the various
incompatible cases. Previously we pretended a single triple arch
was universally compatible, and only distinguished by function
level subtargets. Move towards using distinct triples to enable
more sophisticated toolchain handling in the future, like proper
runtime library linking.

Introduce a new subarch per unique ISA, but also introduce
"major subarches" which are compatible by a set of covered
minor ISA versions. These map to the existing generic targets.
There are a few placeholder subarch entries, which currently
have missing backing generic arches for codegen.

This should be the preferred triple arch name going forward,
but is treated as an alias of amdgcn. This does not yet change
clang to emit the new triples.

    [2 lines not shown]
DeltaFile
+548-434llvm/docs/AMDGPUUsage.rst
+417-0llvm/unittests/TargetParser/TargetParserTest.cpp
+239-11llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+177-0llvm/test/CodeGen/AMDGPU/target-id-from-triple.ll
+147-15llvm/lib/TargetParser/Triple.cpp
+138-12llvm/unittests/TargetParser/TripleTest.cpp
+1,666-47272 files not shown
+2,502-67878 files

LLVM/project 47f77e3flang/lib/Semantics openmp-utils.cpp

[flang][OpenMP] Add explicit return type to visitor lambdas

This should silence MSVC (14.51.36231) error:
error C2338: static assertion failed: 'visit() requires the result of
all potential invocations to have the same type and value category
(N4950 [variant.visit]/5).'

e.g. https://lab.llvm.org/buildbot/#/builders/166/builds/9664
DeltaFile
+4-2flang/lib/Semantics/openmp-utils.cpp
+4-21 files

LLVM/project d939c77mlir/lib/Dialect/OpenACC/Transforms ACCComputeLowering.cpp, mlir/test/Dialect/OpenACC acc-compute-lowering-compute.mlir acc-compute-lowering-loop.mlir

[mlir][acc] Lower sequential acc.loop to scf.for in ACCComputeLowering (#206165)

Sequential loops already have fixed parallelism, so represent them with
`scf.for` rather than `scf.parallel`. To prevent further analysis and
parallelization, `parDimAttr` is set to seq.
DeltaFile
+7-8mlir/lib/Dialect/OpenACC/Transforms/ACCComputeLowering.cpp
+4-4mlir/test/Dialect/OpenACC/acc-compute-lowering-compute.mlir
+3-3mlir/test/Dialect/OpenACC/acc-compute-lowering-loop.mlir
+14-153 files

LLVM/project d50f1c0clang/include/clang/AST HLSLResource.h, clang/lib/CodeGen CGHLSLRuntime.cpp CGExprAgg.cpp

[HLSL] Implement codegen for copying cbuffer structs with resources (#204232)

Global-scope structs are in `hlsl_constant` address space and use
cbuffer layout. When those structs contain resources, the resources are
not stored inline in the constant buffer. Instead, they are represented
as separate globals, or in case of resource arrays initialized on
demand.

This change implements the HLSL codegen for cases where a cbuffer-backed
struct with embedded resources is copied into a local variable or passed
as a function argument. CodeGen materializes a temporary in the default
address space, copies the constant-data fields using the cbuffer struct
layout, and reconstruct the resource members in the local copy.

Fixes #182990
DeltaFile
+385-0clang/test/CodeGenHLSL/resources/cbuffer_struct_passing_with_resources.hlsl
+186-28clang/lib/CodeGen/CGHLSLRuntime.cpp
+10-4clang/lib/CodeGen/CGExprAgg.cpp
+6-0clang/lib/CodeGen/HLSLBufferLayoutBuilder.cpp
+2-2clang/lib/CodeGen/CGHLSLRuntime.h
+2-0clang/include/clang/AST/HLSLResource.h
+591-341 files not shown
+592-347 files

LLVM/project 66ba51allvm/test/tools/llvm-profdata malformed-ptr-to-counter-array.test

[PGO] Fix malformed raw profile test (#206574)

PR #190708 added a uniform counter pointer to the raw profile data
record, but a hand-written raw profile test gained one extra zero word
in the record.

Remove the extra word so the name section starts at the offset expected
by the reader. This fixes the regression while keeping the test focused
on the malformed counter pointer.

Buildbot failure:
https://lab.llvm.org/buildbot/#/builders/24/builds/21581

Test:

```
~/git/scripts_shared/scripts/llvm/llvm-dev.sh llvm test llvm/test/tools/llvm-profdata/malformed-ptr-to-counter-array.test
```
DeltaFile
+0-1llvm/test/tools/llvm-profdata/malformed-ptr-to-counter-array.test
+0-11 files

LLVM/project ca80a06libc/src/__support/regex regex_expr_pool.cpp regex_expr_pool.h, libc/test/src/__support/regex expr_test.cpp CMakeLists.txt

[libc] Add regex AST and ExprPool (#198728)

Implemented the core AST nodes and the ExprPool arena-based allocator.
Utilised AllocChecker for memory safety and enforced hardening at node
initialisation.

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+162-0libc/src/__support/regex/regex_expr_pool.cpp
+118-0libc/src/__support/regex/regex_expr_pool.h
+106-0libc/test/src/__support/regex/expr_test.cpp
+98-0libc/src/__support/regex/regex_ast.h
+15-0libc/src/__support/regex/CMakeLists.txt
+13-0libc/test/src/__support/regex/CMakeLists.txt
+512-04 files not shown
+523-010 files

LLVM/project 94f2ec5.ci/green-dragon lldb-windows.groovy

[lldb][Windows] also run tests with LLDB_TEST_USE_LLDB_SERVER=1 (#206511)

`LLDB_TEST_USE_LLDB_SERVER` defaults to 0, meaning that the green dragon
lldb config on Windows only tests lldb with the in process plugin.

This patch runs the test suite both with and without lldb-server.

This only affects
https://ci-external.swift.org/job/lldb-windows/job/main/.
DeltaFile
+8-2.ci/green-dragon/lldb-windows.groovy
+8-21 files

LLVM/project 3f95a4ebolt/test/AArch64 use-old-text-zero-padding.c

[BOLT] Fix use-old-text-zero-padding on FreeBSD

BSD od supports only decimal value to -N parameter. To fix the test
failure, we use decimal value instead of hex value in this test case.
DeltaFile
+1-1bolt/test/AArch64/use-old-text-zero-padding.c
+1-11 files

LLVM/project 609b651clang/docs LanguageExtensions.md ThreadSafetyAnalysis.md

[docs] Migrate 20 clang docs from reST to Markdown (#206182)

Tracking issue: https://github.com/llvm/llvm-project/issues/201242
Migration guide docs:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
RFC:
https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840

This stacked PR contains the rst2myst conversion and follow-up MyST
cleanup for the 20 clang docs renamed in #206181.

The migration was done with rst2myst with LLM cleanups.
DeltaFile
+3,934-4,356clang/docs/LanguageExtensions.md
+726-787clang/docs/ThreadSafetyAnalysis.md
+585-662clang/docs/ReleaseNotes.md
+465-481clang/docs/LifetimeSafety.md
+384-410clang/docs/SanitizerCoverage.md
+337-363clang/docs/UndefinedBehaviorSanitizer.md
+6,431-7,05916 files not shown
+8,600-9,44322 files

LLVM/project e7ecd46clang/lib/Driver/ToolChains FreeBSD.cpp, clang/test/Driver hip-fpie-option.hip freebsd.c

[Clang] Switch to Default PIE on FreeBSD

We have started to compile the binary in our base as PIE by defualt. It
makes sense to compile the binary to PIE by default in toolchain as
Linux now. Also, extended testcases to support default PIE and no-pie
parameter in freebsd.c and hip-fpie-option.hip.
DeltaFile
+49-9clang/test/Driver/hip-fpie-option.hip
+49-7clang/test/Driver/freebsd.c
+3-4clang/lib/Driver/ToolChains/FreeBSD.cpp
+2-2clang/test/Driver/freebsd-mips-as.c
+103-224 files

LLVM/project f53db00clang/docs LanguageExtensions.rst LanguageExtensions.md

[docs] Rename selected clang docs to Markdown (#206181)

Tracking issue: https://github.com/llvm/llvm-project/issues/201242
Migration guide docs:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
RFC:
https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840

Rename 20 selected clang docs from reStructuredText to MyST Markdown
filenames.

This PR is intentionally limited to the rename phase and required
reference updates. The mechanical conversion and follow-up MyST cleanup
are in the stacked PR.
DeltaFile
+0-7,392clang/docs/LanguageExtensions.rst
+7,392-0clang/docs/LanguageExtensions.md
+0-1,206clang/docs/ReleaseNotes.rst
+1,206-0clang/docs/ReleaseNotes.md
+0-1,182clang/docs/ThreadSafetyAnalysis.rst
+1,182-0clang/docs/ThreadSafetyAnalysis.md
+9,780-9,78035 files not shown
+15,730-15,73041 files

LLVM/project 0304e92clang/include/clang/Basic BuiltinsAMDGPUDocs.td BuiltinsAMDGPU.td, clang/test/CodeGenOpenCL builtins-amdgcn-gfx9.cl

[AMDGPU] Add clang builtin for s_bitreplicate intrinsic (#206177)
DeltaFile
+20-0clang/include/clang/Basic/BuiltinsAMDGPUDocs.td
+10-2clang/test/SemaOpenCL/builtins-amdgcn-error-gfx9.cl
+7-0clang/test/CodeGenOpenCL/builtins-amdgcn-gfx9.cl
+4-0clang/include/clang/Basic/BuiltinsAMDGPU.td
+1-0llvm/include/llvm/IR/IntrinsicsAMDGPU.td
+42-25 files

LLVM/project 25ae714mlir/lib/Dialect/OpenACC/IR OpenACCCG.cpp, mlir/test/Dialect/OpenACC invalid-cg.mlir

[mlir][acc] Improve verifier for workgroup memory operation (#206187)

Adds validity checks for the scaling and offset attributes that they
must be non-negative.
DeltaFile
+26-0mlir/test/Dialect/OpenACC/invalid-cg.mlir
+8-0mlir/lib/Dialect/OpenACC/IR/OpenACCCG.cpp
+34-02 files

LLVM/project 8834901llvm/lib/CAS ActionCaches.cpp BuiltinCAS.cpp

[llvm][cas] Fix a couple of includes NFC (#206573)

Remove two unused includes, and add an include that was relying on
transitive includes. Noticed these in the diff between downstream and
upstream sources.
DeltaFile
+1-1llvm/lib/CAS/ActionCaches.cpp
+0-1llvm/lib/CAS/BuiltinCAS.cpp
+1-22 files

LLVM/project 162f44cllvm/include/llvm/Analysis LoopAccessAnalysis.h, llvm/lib/Analysis LoopAccessAnalysis.cpp

[VPlan] Widen unit stride accesses in makeMemOpWideningDecisions (NFCI) (#205013)

Add a new sub-pass to widen unit-stride accesses in
makeMemOpWideningDecisions.

Depends on https://github.com/llvm/llvm-project/pull/196842 

PR: https://github.com/llvm/llvm-project/pull/205013
DeltaFile
+60-2llvm/test/Transforms/LoopVectorize/VPlan/AArch64/vplan-memory-op-decisions.ll
+49-0llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+4-5llvm/lib/Analysis/LoopAccessAnalysis.cpp
+8-0llvm/include/llvm/Analysis/LoopAccessAnalysis.h
+1-0llvm/test/Transforms/LoopVectorize/VPlan/vplan-print-before-after-all.ll
+122-75 files

LLVM/project aff85d3llvm/test/CodeGen/AMDGPU llvm.amdgcn.tanh.ll

[AMDGPU] Add additional coverage tests for llvm.amdgcn.tanh, NFC (#202864)

Mainly for source modifiers: neg, abs and neg(abs)

---------

Co-authored-by: Claude Sonnet 4 <noreply at anthropic.com>
DeltaFile
+490-236llvm/test/CodeGen/AMDGPU/llvm.amdgcn.tanh.ll
+490-2361 files

LLVM/project 2a215f4clang/include/clang/Basic DiagnosticOptions.h, clang/lib/AST ASTDumper.cpp

[Clang] Refactor and consolidate color diagnostic handling (#202441)

Summary:
This PR tries to consolidate the color output handling in Clang. The
motivation was noticing that `-Xclang -ast-dump` would not behave like
`-fcolor-diagnostics` and would output ANSI codes to a file when I tried
to pipe it.

This PR primarily turns the handling into a tri-state enum keyed off of
`-f[no]-color-diagnostics`. The default/auto case will be if the target
stream supports colors. Getting this to work required a lot of seemingly
unrelated plumbing.

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+21-18clang/lib/Frontend/CompilerInvocation.cpp
+17-11clang/lib/AST/ASTDumper.cpp
+25-0clang/test/Misc/diagnostic-color-output-stream.cpp
+23-0clang/include/clang/Basic/DiagnosticOptions.h
+12-11clang/lib/Frontend/TextDiagnostic.cpp
+9-4lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+107-4412 files not shown
+148-6718 files

LLVM/project 971a872llvm/lib/Target/AMDGPU SIInstructions.td, llvm/test/CodeGen/AMDGPU llvm.amdgcn.mfma.gfx950.ll v_mov_b64-isel.ll

[AMDGPU] Select `V_MOV_B64_e32` directly if a target supports it (#206135)
DeltaFile
+192-204llvm/test/CodeGen/AMDGPU/llvm.amdgcn.mfma.gfx950.ll
+119-0llvm/test/CodeGen/AMDGPU/v_mov_b64-isel.ll
+25-26llvm/test/CodeGen/AMDGPU/rewrite-vgpr-mfma-to-agpr.ll
+16-16llvm/test/CodeGen/AMDGPU/llvm.amdgcn.mfma.gfx950.bf16.ll
+30-0llvm/lib/Target/AMDGPU/SIInstructions.td
+3-2llvm/test/CodeGen/AMDGPU/siloadstoreopt-misaligned-regsequence.ll
+385-2481 files not shown
+386-2487 files

LLVM/project 2628e61llvm/include/llvm/CodeGen TargetLowering.h TargetFrameLowering.h, llvm/lib/CodeGen MachineFunctionPass.cpp

[CodeGen] Migrate report_fatal_error from CodeGen headers (#203656)

Replace deprecated report_fatal_error references in
llvm/include/llvm/CodeGen with reportFatalInternalError or
reportFatalUsageError based on the failure category.

MachineFunctionProperties verification failures indicate an internal
codegen pipeline invariant failure. Default target hooks for unsupported
functionality use reportFatalUsageError. Also update stale pseudocode in
IRTranslator.h.

Part of #138914.
DeltaFile
+2-2llvm/test/CodeGen/AMDGPU/branch-folder-requires-no-phis.mir
+2-2llvm/test/CodeGen/AMDGPU/machine-cse-ssa.mir
+2-2llvm/test/CodeGen/AMDGPU/si-fold-operands-requires-ssa.mir
+2-2llvm/include/llvm/CodeGen/TargetLowering.h
+2-1llvm/lib/CodeGen/MachineFunctionPass.cpp
+2-1llvm/include/llvm/CodeGen/TargetFrameLowering.h
+12-105 files not shown
+17-1511 files

LLVM/project a873660lldb/include/lldb/Core Diagnostics.h Debugger.h, lldb/source/Commands CommandObjectDiagnostics.cpp

[lldb] Collect a diagnostics bundle on the Diagnostics class (#206189)

Add Diagnostics::Collect, which gathers the state a triager needs into a
directory, best-effort (one failed section never sinks the rest): the
always-on log plus the debugger's file logs, statistics.json from
DebuggerStats, and a snapshot of the commands run first when triaging
(target list, image list, thread list, backtraces, image lookup, frame
variable).

It returns a Diagnostics::Report with the LLDB version, host, and how
LLDB was invoked, plus an Attachments holding the bundle directory and
the files written into it. Each file is recorded as it is written, so a
file that could not be created is simply absent from the list. The
report is expected to grow more fields over time.

`diagnostics dump` now calls Collect and prints the report as JSON to
the terminal instead of only reporting where the directory was written.
Here's what this all looks like:


    [18 lines not shown]
DeltaFile
+195-1lldb/source/Core/Diagnostics.cpp
+66-1lldb/include/lldb/Core/Diagnostics.h
+25-5lldb/test/Shell/Diagnostics/TestDump.test
+10-9lldb/source/Commands/CommandObjectDiagnostics.cpp
+7-3lldb/source/Core/Debugger.cpp
+3-2lldb/include/lldb/Core/Debugger.h
+306-216 files