Changes

Summary

  1. [NFC] correcting a code comment. (details)
  2. [SCEV] Part 1, Serialize function calls in function arguments. (details)
  3. [SystemZ] Bugfix in SystemZTargetLowering::combineINT_TO_FP() (details)
  4. Revert "[BasicAA] Remove unneeded special case for malloc/calloc" (details)
  5. clang-cl: Move /Zc: tests from cl-options.c to cl-zc.cpp (details)
  6. [OpenMP] libomp: honor passive wait policy requested with tasking (details)
  7. [ARM] Clean up a test check from D125604. NFC (details)
  8. [RISCV][NFC] Rename variable in RISCVVEmitter.cpp (details)
  9. [tests] Add test coverage for issue causing revert f7988d0 (details)
  10. [LoopUnroll] Regenerate test checks (NFC) (details)
  11. Revert "Reland(2) "[clangd] Indexing of standard library"" (details)
  12. [AArch64] Add tests showing reassoc breaks (s|u)ml(a|s)l selection. (details)
  13. [gn build] Port 77533ea443ac (details)
  14. [lldb] Change implementation of memory read --show-tags option (details)
  15. [gn build] Port 29e556fc2ba9 (details)
  16. [mlir][sparse] Add support for complex.im and complex.re to the sparse compiler. (details)
  17. [libunwind][AArch64] Add support for DWARF expression for RA_SIGN_STATE. (details)
  18. Apply clang-tidy fixes for performance-for-range-copy in LinalgOps.cpp (NFC) (details)
  19. Apply clang-tidy fixes for llvm-else-after-return in OpenMPDialect.cpp (NFC) (details)
  20. [DAGCombiner] Fix bug in MatchBSwapHWordLow. (details)
  21. [clang-tidy] Fix readability-simplify-boolean-expr crash with implicit cast in return. (details)
  22. [ObjCopy][NFC] Remove unneeded zero initialization (details)
  23. Correct the diagnostic behavior for unreachable _Generic associations in C++ (details)
  24. [Debuginfod] Add --debug-file-directory to llvm-debuginfod-find. (details)
  25. Partially revert "[CMake] Passthrough OSX CMake options to builtins and runtimes" (details)
  26. Add a darwin platform setting to specify which exceptions debugserver (details)
  27. [gn build] port 6694491affa18 (details)
  28. [mlir][ods] Simplify useDefaultType/AttributePrinterParser (details)
  29. [RISCV] Add test cases showing failure to remove mask on rotate amounts. (details)
  30. [RISCV] Use selectShiftMaskXLen ComplexPattern for isel of rotates. (details)
  31. [runtimes] Default LIB*_HERMETIC_STATIC_LIBRARY to ON on Windows (details)
  32. [MC] [Win64EH] Remove an unused parameter to ARM64EmitUnwindCode. NFC. (details)
  33. [MC] [Win64EH] Don't produce packed ARM64 unwind info with homed parameters (details)
  34. [libc] Add strlcpy (details)
  35. [libc] Add String to bsd headers (details)
  36. [libc++][format] Adds a formattable concept. (details)
  37. [gn build] Port 15c809e8e780 (details)
  38. [libc++][format] Adds formatter<charT[N], charT>. (details)
  39. [libc++][format] Improve format-arg-store. (details)
  40. [SystemZ][z/OS] Add the PPA1 to SystemZAsmPrinter (details)
  41. [libc++][format][5/6] Improve format_to_n. (details)
  42. [CMake][Fuchsia] Build runtimes as universal libraries on OS X (details)
  43. [libc] fix missing semicolon in bsd_ext.td (details)
  44. [gn build] Port 4d8268fbf4cd (details)
  45. [llvm-readobj] Improve printing of Windows ARM packed unwind info (details)
Commit 47258ffc5c7aa9ae2017bdde58a88e0f928d8f07 by chris.bieneman
[NFC] correcting a code comment.
The file was modifiedllvm/lib/Object/DXContainer.cpp
Commit 6ca7eb2c6d7da2264f410f270633bf698ab5d87d by geek4civic
[SCEV] Part 1, Serialize function calls in function arguments.

Evaluation odering in function call arguments is implementation-dependent.
In fact, gcc evaluates bottom-top and clang does top-bottom.

Fixes #55283 partially.

Part of https://reviews.llvm.org/D125627
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/lib/Transforms/Utils/SimplifyIndVar.cpp
Commit 4273e616e573f4854e9c659c2e6d8a31f3e3c595 by paulsson
[SystemZ] Bugfix in SystemZTargetLowering::combineINT_TO_FP()

Make sure to also handle extended value types to avoid crashing.

Resulting integers greater than 64 bits are not optimized (i128 is not a
legal type), and vectorizing seems to result in libcalls instead of just
scalarization.

Other extended vector types like <10 x float> are however now handled and
should result in vectorized conversions.

Reviewed By: Ulrich Weigand

Differential Revision: https://reviews.llvm.org/D125881
The file was modifiedllvm/lib/Target/SystemZ/SystemZISelLowering.cpp
The file was modifiedllvm/test/CodeGen/SystemZ/vec-move-23.ll
Commit f7988d08a8bf11e551e720ba72c90c42d6756ece by listmail
Revert "[BasicAA] Remove unneeded special case for malloc/calloc"

This reverts commit 9b1e00738c5ddba681e17e5cb7c260d9afc4c3a7.

Nikic reported in commit thread that I had forgotten history here, and that a) we'd tried this before, and b) had to revert due to an unexpected codegen impact.  Current measurements confirm the same issue still exists.
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
The file was modifiedllvm/test/Transforms/GVN/nonescaping-malloc.ll
Commit d39928e2cc393a21c8367ef318019166124f4b56 by thakis
clang-cl: Move /Zc: tests from cl-options.c to cl-zc.cpp

Since we already have a dedicated file for testing the /Zc: flags,
let's be consistent about putting /Zc: tests there.

No behavior change.

Differential Revision: https://reviews.llvm.org/D125889
The file was modifiedclang/test/Driver/cl-options.c
The file was modifiedclang/test/Driver/cl-zc.cpp
Commit c44ba01de7f050f126a8a7b2ddeb6286237bb384 by jonathan.l.peyton
[OpenMP] libomp: honor passive wait policy requested with tasking

Currently the library ignores requested wait policy in the presence
of tasking. Threads always actively spin. The patch fixes this problem
making the wait policy passive if this explicitly requested by user.

Differential Revision: https://reviews.llvm.org/D123044
The file was modifiedopenmp/runtime/src/kmp.h
The file was modifiedopenmp/runtime/src/kmp_tasking.cpp
The file was modifiedopenmp/runtime/src/kmp_global.cpp
The file was modifiedopenmp/runtime/src/kmp_wait_release.h
The file was modifiedopenmp/runtime/src/kmp_settings.cpp
Commit fc0229fd6bfd1fb57409c284de5e5a8ac7349b69 by david.green
[ARM] Clean up a test check from D125604. NFC

The Arm test had a incorrect check line with the wrong offset. From the
look of the code it should be -400*4 = 0xFFFFF9C0 = 4294965696
The file was modifiedllvm/test/CodeGen/Thumb2/thumb2-execute-only-prologue.ll
Commit 1467e01f8f699fa2a69937dd07e51325ba71a93b by kito.cheng
[RISCV][NFC] Rename variable in RISCVVEmitter.cpp

- Use `Overloaded` rather than `Mangled`.
- Use `Prototype` or `Desc` rather than `Seq`, it's not just a string sequence.
  - `Prototype` for those PrototypeDescriptor will used to evaluate as argument type.
  - `Desc` for those PrototypeDescriptor will used to evaluate as part of function name.

Reviewed By: khchen

Differential Revision: https://reviews.llvm.org/D125886
The file was modifiedclang/utils/TableGen/RISCVVEmitter.cpp
Commit 6381d4845b06a6d45d5fc237b360fac2979f1193 by listmail
[tests] Add test coverage for issue causing revert f7988d0

As theorized, it does look like opnew is not getting inferred inaccessiblemmemonly.
The file was addedllvm/test/Transforms/GVN/nonescaping.ll
Commit e44fe27251953c4d878688b06b5f6d26f39cd6ed by npopov
[LoopUnroll] Regenerate test checks (NFC)
The file was modifiedllvm/test/Transforms/LoopUnroll/tripcount-overflow.ll
Commit 77533ea443aca6e9978d7c8a6822420f8345f6af by sam.mccall
Revert "Reland(2) "[clangd] Indexing of standard library""

This reverts commit ca875539f788c8063e243ce9ceb877a0d2ad9115.
The file was modifiedclang-tools-extra/clangd/ConfigCompile.cpp
The file was modifiedclang-tools-extra/clangd/TUScheduler.h
The file was removedclang-tools-extra/clangd/index/StdLib.cpp
The file was modifiedclang-tools-extra/clangd/TUScheduler.cpp
The file was modifiedclang-tools-extra/clangd/index/SymbolOrigin.h
The file was modifiedclang-tools-extra/clangd/unittests/CMakeLists.txt
The file was modifiedclang-tools-extra/clangd/ConfigYAML.cpp
The file was modifiedclang-tools-extra/clangd/ClangdServer.h
The file was modifiedclang-tools-extra/clangd/ClangdServer.cpp
The file was modifiedclang-tools-extra/clangd/index/SymbolOrigin.cpp
The file was modifiedclang-tools-extra/clangd/Config.h
The file was modifiedclang-tools-extra/clangd/index/FileIndex.cpp
The file was modifiedclang-tools-extra/clangd/index/FileIndex.h
The file was modifiedclang-tools-extra/clangd/ConfigFragment.h
The file was modifiedclang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
The file was removedclang-tools-extra/clangd/unittests/StdLibTests.cpp
The file was modifiedclang-tools-extra/clangd/CMakeLists.txt
The file was removedclang-tools-extra/clangd/index/StdLib.h
Commit a74e075908585896b40b8f176e51f8832026b32d by flo
[AArch64] Add tests showing reassoc breaks (s|u)ml(a|s)l selection.
The file was modifiedllvm/test/CodeGen/AArch64/arm64-vmul.ll
Commit ca302f07b453cc79e56ff4834930697a6be52707 by llvmgnsyncbot
[gn build] Port 77533ea443ac
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clangd/unittests/BUILD.gn
Commit 29e556fc2ba93028f0dc45c4c2636da6283e9c28 by david.spickett
[lldb] Change implementation of memory read --show-tags option

This does 2 things:
* Moves it after the short options. Which makes sense given it's
  a niche, default off option.
  (if 2 files for one option seems a bit much, I am going to reuse
  them for "memory find" later)
* Fixes the use of repeated commands. For example:
    memory read buf --show-tags
    <shows tags>
    memory read
    <shows tags>

Added tests for the repetition and updated existing help tests.

Reviewed By: omjavaid

Differential Revision: https://reviews.llvm.org/D125089
The file was modifiedlldb/source/Interpreter/CMakeLists.txt
The file was modifiedlldb/test/API/commands/help/TestHelp.py
The file was addedlldb/source/Interpreter/OptionGroupMemoryTag.cpp
The file was modifiedlldb/source/Commands/CommandObjectMemory.cpp
The file was addedlldb/include/lldb/Interpreter/OptionGroupMemoryTag.h
The file was modifiedlldb/source/Commands/Options.td
The file was modifiedlldb/test/API/linux/aarch64/mte_tag_access/TestAArch64LinuxMTEMemoryTagAccess.py
Commit 66dfa36e7d00faf524ed7e6652162393065cfa3f by llvmgnsyncbot
[gn build] Port 29e556fc2ba9
The file was modifiedllvm/utils/gn/secondary/lldb/source/Interpreter/BUILD.gn
Commit 69edacbcf0c232de6213297cb600b0f0313c6397 by bixia
[mlir][sparse] Add support for complex.im and complex.re to the sparse compiler.

Add a test.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D125834
The file was modifiedmlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
The file was modifiedmlir/lib/Dialect/SparseTensor/Utils/Merger.cpp
The file was addedmlir/test/Integration/Dialect/SparseTensor/CPU/sparse_re_im.mlir
Commit c218fd3d7d3764eb123c8429bbcd33bacfe2e633 by daniel.kiss
[libunwind][AArch64] Add support for DWARF expression for RA_SIGN_STATE.

Program may set the RA_SIGN_STATE pseudo register by expressions.
Libunwind expected only the DW_CFA_AARCH64_negate_ra_state could change the value
of the register which leads to runtime errors on PAC enabled systems.
In the recent version of the aadwarf64[1] a limitation is added[2] to forbid the mixing the
DW_CFA_AARCH64_negate_ra_state with other DWARF Register Rule Instructions.

[1] https://github.com/ARM-software/abi-aa/releases/tag/2022Q1
[2] https://github.com/ARM-software/abi-aa/pull/129

Reviewed By: #libunwind, MaskRay

Differential Revision: https://reviews.llvm.org/D123692
Reland: test moved because it depends on exceptions.
The file was modifiedlibunwind/src/DwarfInstructions.hpp
The file was addedlibcxxabi/test/native/AArch64/ra_sign_state.pass.cpp
Commit e1ff449ec9272bf9af6a0eab5240775b9a8a09fc by joker.eph
Apply clang-tidy fixes for performance-for-range-copy in LinalgOps.cpp (NFC)
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Commit 302158df6a694c051b46d28ff589c6fad8d81f5c by joker.eph
Apply clang-tidy fixes for llvm-else-after-return in OpenMPDialect.cpp (NFC)
The file was modifiedmlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
Commit 46eef7687639eca1319a93d93d9e588ee0219f8c by craig.topper
[DAGCombiner] Fix bug in MatchBSwapHWordLow.

This function tries to match (a >> 8) | (a << 8) as (bswap a) >> 16.

If the SRL isn't masked and the high bits aren't demanded, we still
need to ensure that bits 23:16 are zero. After the right shift they
will be in bits 15:8 which is where the important bits from the SHL
end up. It's only a bswap if the OR on bits 15:8 only takes the bits
from the SHL.

Fixes PR55484.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D125641
The file was modifiedllvm/test/CodeGen/ARM/rev.ll
The file was modifiedllvm/test/CodeGen/X86/bswap.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-rev.ll
The file was modifiedllvm/test/CodeGen/Thumb/rev.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/RISCV/bswap-bitreverse.ll
Commit 4739176fd3047dfa13eae307c56c6dba7b605019 by n.james93
[clang-tidy] Fix readability-simplify-boolean-expr crash with implicit cast in return.

Fixes https://github.com/llvm/llvm-project/issues/55557

Reviewed By: LegalizeAdulthood

Differential Revision: https://reviews.llvm.org/D125877
The file was modifiedclang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.h
The file was modifiedclang-tools-extra/unittests/clang-tidy/ReadabilityModuleTest.cpp
Commit 087ef34fffb27de8aacce4aa56d5c2deb53bdd0b by i
[ObjCopy][NFC] Remove unneeded zero initialization

getNewMemBuffer has called memset.

Reviewed By: alexander-shaposhnikov

Differential Revision: https://reviews.llvm.org/D125833
The file was modifiedllvm/lib/ObjCopy/MachO/MachOWriter.cpp
Commit 47b8424a533d5c02fd8b3517047cf93e533f00d0 by aaron
Correct the diagnostic behavior for unreachable _Generic associations in C++

New diagnostics were added for unreachable generic selection expression
associations in ca75ac5f04f269def97e6844c2f5c9596b29c84c, but it did
not account for a difference in behavior between C and C++ regarding
lvalue to rvalue conversions. So we would issue diagnostics about a
selection being unreachable and then reach it. This corrects the
diagnostic behavior in that case.

Differential Revision: https://reviews.llvm.org/D125882
The file was modifiedclang/test/Sema/generic-selection.c
The file was modifiedclang/test/SemaCXX/generic-selection.cpp
The file was modifiedclang/lib/Sema/SemaExpr.cpp
Commit eafa0530417e09755b94d0e94afc0f792b98c80d by dthorn
[Debuginfod] Add --debug-file-directory to llvm-debuginfod-find.

This allows llvm-debuginfod-find to locate binaries in local build ID
directories configured via --debug-file-directory, the same flag used
for this purpose by llvm-symbolizer. This provides a consistent lookup
semantics between the two tools when configured the same way, in
particular when debug binaries may be located either locally or
remotely.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D125864
The file was modifiedllvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
The file was addedllvm/test/tools/llvm-debuginfod-find/local.test
Commit ececce1b5ec1a83434568591e4c18ac79e4f3631 by phosek
Partially revert "[CMake] Passthrough OSX CMake options to builtins and runtimes"

This partially reverts commit 9cddfe3085c4c500e64350b56c37ae2ed1cbe3f6,
specifically passthrough for CMAKE_OSX_* since this can lead to build
passing through internal variables when it's not intended.
The file was modifiedllvm/runtimes/CMakeLists.txt
Commit bff4673b41781ec5bff6b96b52cf321d2271726c by jingham
Add a darwin platform setting to specify which exceptions debugserver
should not receive as exceptions (some will get converted to BSD
signals instead).  This is really the only stable way to ensure that
a Mach exception gets converted to it's equivalent BSD signal.  For
programs that rely on BSD signal handlers, this has to happen or you
can't even get the program to invoke the signal handler when under
the debugger.

This builds on a previous solution to this problem which required you
start debugserver with the -U flag.  This was not very discoverable
and required lldb be the one to launch debugserver, which is not always
the case.

Differential Revision: https://reviews.llvm.org/D125434
The file was modifiedlldb/tools/debugserver/source/debugserver.cpp
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
The file was modifiedlldb/include/lldb/Utility/StringExtractorGDBRemote.h
The file was modifiedlldb/tools/debugserver/source/MacOSX/MachTask.mm
The file was modifiedlldb/include/lldb/Target/Platform.h
The file was modifiedlldb/tools/debugserver/source/MacOSX/MachProcess.mm
The file was modifiedlldb/tools/debugserver/source/DNB.cpp
The file was modifiedlldb/source/Utility/StringExtractorGDBRemote.cpp
The file was addedlldb/test/API/macosx/ignore_exceptions/main.c
The file was modifiedlldb/tools/debugserver/source/MacOSX/MachTask.h
The file was modifiedlldb/tools/debugserver/source/DNB.h
The file was modifiedlldb/source/Target/Platform.cpp
The file was modifiedlldb/include/lldb/Interpreter/OptionValueString.h
The file was addedlldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformMacOSXProperties.td
The file was modifiedlldb/tools/debugserver/source/MacOSX/MachException.cpp
The file was modifiedlldb/tools/debugserver/source/MacOSX/MachProcess.h
The file was modifiedlldb/tools/debugserver/source/MacOSX/MachException.h
The file was modifiedlldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
The file was modifiedlldb/tools/debugserver/source/RNBRemote.h
The file was modifiedlldb/tools/debugserver/source/RNBContext.cpp
The file was addedlldb/test/API/macosx/ignore_exceptions/Makefile
The file was modifiedlldb/tools/debugserver/source/RNBContext.h
The file was modifiedlldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
The file was modifiedlldb/tools/debugserver/source/RNBRemote.cpp
Commit 91a8caa831ae9c0050ff6cd6f2104f6769932895 by thakis
[gn build] port 6694491affa18

Needed to link llvm-debuginfod-find after eafa0530417e.
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Debuginfod/BUILD.gn
Commit 4957518ef57f35e64d0b9716b745c654efa91d36 by jeffniu22
[mlir][ods] Simplify useDefaultType/AttributePrinterParser

The current behaviour of `useDefaultTypePrinterParser` and `useDefaultAttributePrinterParser` is that they are set by default, but the dialect generator only generates the declarations for the parsing and printing hooks if it sees dialect types and attributes. Same goes for the definitions generated by the AttrOrTypeDef generator.

This can lead to confusing and undesirable behaviour if the dialect generator doesn't see the definitions of the attributes and types, for example, if they are sensibly separated into different files: `Dialect.td`, `Ops.td`, `Attributes.td`, and `Types.td`.

Now, these bits are unset by default. Setting them will always result in the dialect generator emitting the declarations for the parsing hooks. And if the AttrOrTypeDef generator sees it set, it will generate the default implementations.

Reviewed By: rriddle, stellaraccident

Differential Revision: https://reviews.llvm.org/D125809
The file was modifiedmlir/include/mlir/Dialect/NVGPU/NVGPU.td
The file was modifiedmlir/test/python/python_test_ops.td
The file was modifiedmlir/include/mlir/Dialect/Quant/QuantOpsBase.td
The file was modifiedmlir/include/mlir/Dialect/EmitC/IR/EmitCBase.td
The file was modifiedmlir/include/mlir/Dialect/PDL/IR/PDLDialect.td
The file was modifiedmlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
The file was modifiedmlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
The file was modifiedmlir/include/mlir/IR/DialectBase.td
The file was modifiedmlir/tools/mlir-tblgen/DialectGen.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
The file was modifiedmlir/examples/toy/Ch7/include/toy/Ops.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
The file was modifiedmlir/include/mlir/Dialect/DLTI/DLTIBase.td
The file was modifiedmlir/include/mlir/Dialect/Shape/IR/ShapeBase.td
The file was modifiedmlir/include/mlir/Dialect/Vector/IR/VectorOps.td
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUBase.td
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
The file was modifiedmlir/include/mlir/Dialect/Async/IR/AsyncDialect.td
The file was modifiedmlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td
Commit e2f410feeab27a8bb2c015fc02bb8527702e401f by craig.topper
[RISCV] Add test cases showing failure to remove mask on rotate amounts.

If the masking AND has multiple users we fail to remove it.
The file was modifiedllvm/test/CodeGen/RISCV/rotl-rotr.ll
Commit 86f7d7074a0129955aa2f5c82fe8c383eb17a35a by craig.topper
[RISCV] Use selectShiftMaskXLen ComplexPattern for isel of rotates.

This will remove masks on the shift amount. We usually get this with
SimplifyDemandedBits in DAGCombine, but that's restricted to cases
where the AND has a single use. selectShiftMaskXLen does not have
that restriction.
The file was modifiedllvm/test/CodeGen/RISCV/rotl-rotr.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoZb.td
Commit bedf657d0f4c54ffe9ef4303382657a74296b544 by martin
[runtimes] Default LIB*_HERMETIC_STATIC_LIBRARY to ON on Windows

(In the case of libunwind, the cmake option is called
LIBUNWIND_HIDE_SYMBOLS, but it has the same effect as
LIBCXX_HERMETIC_STATIC_LIBRARY and
LIBCXXABI_HERMETIC_STATIC_LIBRARY.)

Previously, the same issue was dealt with by setting a project wide
define (_LIBUNWIND_HIDE_SYMBOLS,
_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS and
_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) if only building a static
library.  If building both static and shared at the same time, this
wasn't set, and the static library would contain dllexport directives.

The LIB*_HERMETIC_STATIC_LIBRARY and LIBUNWIND_HIDE_SYMBOLS cmake
options only apply the defines to the static library in the build,
even if building both static and shared at the same time.

(This could only be done use after the object libraries were
enabled, as a shared libcxx needs libcxxabi object files built
with dllexports included.)

This allows removing inelegant code for deciding how to build the
libcxxabi static library and a TODO comment that suggested that
users should need to start setting an option, which they shouldn't
need to. Finally, this gets rid of two XFAILs in tests.

Differential Revision: https://reviews.llvm.org/D125715
The file was modifiedlibcxxabi/CMakeLists.txt
The file was modifiedlibcxxabi/src/CMakeLists.txt
The file was modifiedlibunwind/CMakeLists.txt
The file was modifiedlibcxx/test/libcxx/vendor/mingw/static-lib-exports.sh.cpp
The file was modifiedlibcxx/src/CMakeLists.txt
The file was modifiedlibcxx/test/libcxx/vendor/clang-cl/static-lib-exports.sh.cpp
The file was modifiedlibcxx/CMakeLists.txt
Commit 091a55c16ad4e87aa67a3c003fade1a226698734 by martin
[MC] [Win64EH] Remove an unused parameter to ARM64EmitUnwindCode. NFC.

Differential Revision: https://reviews.llvm.org/D125878
The file was modifiedllvm/lib/MC/MCWin64EH.cpp
Commit 924defada9bc0e3c89b0c0e288d7cb4dd654e7d4 by martin
[MC] [Win64EH] Don't produce packed ARM64 unwind info with homed parameters

There's an inconsistency regarding the epilogs of packed ARM64
unwind info with homed parameters; according to the documentation
(and according to common sense), the epilog wouldn't have a series
of nop instructions matching the stp x0-x7 in the prolog - however
in practice, RtlVirtualUnwind still seems to behave as if the epilog
does have the mirrored nops from the prolog.

In practice, MSVC doesn't seem to produce packed unwind info with
homed parameters, which might be why this inconsistency hasn't
been noticed.

Thus, to play it safe, avoid creating such packed unwind info with
homed parameters. (LLVM's current behaviour matches the current
runtime behaviour of RtlVirtualUnwind, but if it later is bug fixed
to match the documentation, such unwind information would be
incorrect.)

See https://github.com/llvm/llvm-project/issues/54879 for further
discussion on the matter.

Differential Revision: https://reviews.llvm.org/D125876
The file was modifiedllvm/lib/MC/MCWin64EH.cpp
The file was modifiedllvm/test/MC/AArch64/seh-packed-unwind.s
Commit fc2c8b2371d7c3ef7c0ed348598abadcfdfcd467 by abrachet
[libc] Add strlcpy

Differential Revision: https://reviews.llvm.org/D125806
The file was addedlibc/spec/bsd_ext.td
The file was modifiedlibc/config/darwin/arm/entrypoints.txt
The file was modifiedlibc/config/linux/x86_64/entrypoints.txt
The file was addedlibc/src/string/strlcpy.h
The file was modifiedlibc/test/src/string/CMakeLists.txt
The file was addedlibc/src/string/strlcpy.cpp
The file was addedlibc/test/src/string/strlcpy_test.cpp
The file was modifiedlibc/src/string/CMakeLists.txt
The file was modifiedlibc/config/windows/entrypoints.txt
The file was modifiedlibc/config/linux/api.td
The file was modifiedlibc/config/linux/aarch64/entrypoints.txt
Commit 6adbcd2b102e25a613d8c2df74eddb1fb34e7216 by abrachet
[libc] Add String to bsd headers
The file was modifiedlibc/spec/bsd_ext.td
Commit 15c809e8e78083d59f1c0b09ca1d1644e0976961 by koraq
[libc++][format] Adds a formattable concept.

The concept is based on P2286R2 Formatting Ranges. It will be used to
optimise the storage of __format_arg_store as required by LWG-3473.

Depends on D120916

Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D120921
The file was modifiedlibcxx/test/libcxx/private_headers.verify.cpp
The file was addedlibcxx/test/libcxx/utilities/format/format.formatter/format.formatter.spec/formattable.compile.pass.cpp
The file was modifiedlibcxx/include/CMakeLists.txt
The file was modifiedlibcxx/include/module.modulemap
The file was modifiedlibcxx/include/format
The file was modifiedlibcxx/include/__format/format_fwd.h
The file was addedlibcxx/include/__format/concepts.h
Commit d8de7244f261d450f40fc175b224d37acd751ec8 by llvmgnsyncbot
[gn build] Port 15c809e8e780
The file was modifiedllvm/utils/gn/secondary/libcxx/include/BUILD.gn
Commit f0e61029506fd63bb300f2dbbd65ba792e4ef3a2 by koraq
[libc++][format] Adds formatter<charT[N], charT>.

This formatter isn't in the list of required formatters in

[format.formatter.spec]/2.2
  For each charT, the string type specializations
   template<> struct formatter<charT*, charT>;
  template<> struct formatter<const charT*, charT>;
  template<size_t N> struct formatter<const charT[N], charT>;
  template<class traits, class Allocator>
    struct formatter<basic_string<charT, traits, Allocator>, charT>;
  template<class traits>
    struct formatter<basic_string_view<charT, traits>, charT>;

Since remove_cvref_t<const charT[N]> is charT[N] the formatter is
required by

[format.functions]/25
  Preconditions: formatter<remove_cvref_t<Ti>, charT> meets the
  BasicFormatter requirements ([formatter.requirements]) for each Ti in
  Args.

Depends on D120921

Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D121138
The file was addedlibcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp
The file was modifiedlibcxx/include/__format/formatter_string.h
The file was modifiedlibcxx/test/libcxx/utilities/format/format.formatter/format.formatter.spec/formattable.compile.pass.cpp
The file was modifiedlibcxx/test/std/utilities/format/format.formatter/format.formatter.spec/types.compile.pass.cpp
Commit 4d8268fbf4cd30d39530622b7f1dc487122b4f3c by koraq
[libc++][format] Improve format-arg-store.

This optimizes the __format_arg_store type to allow a more efficient
storage of the basic_format_args.

It stores the data in two arrays:
- A struct with the tag of the exposition only variant's type and the
  offset of the element in the data array. Since this array only depends
  on the type information it's calculated at compile time and can be
  shared by different instances of this class.
- The arguments converted to the types used in the exposition only
  variant of basic_format_arg. This means the packed data can be
  directly copied to an element of this variant.

The new code uses rvalue reference arguments in preparation for P2418.
The handle class also has some changes to prepare for P2418. The real
changed for P2418 will be done separately, but these parts make it
easier to implement that paper.

Some parts of existing test code are removed since they were no longer
valid after the changes, but new tests have been added.

Implements parts of:
- P2418 Add support for std::generator-like types to std::format

Completes:
- LWG3473 Normative encouragement in non-normative note

Depends on D121138

Reviewed By: #libc, vitaut, Mordante

Differential Revision: https://reviews.llvm.org/D121514
The file was modifiedlibcxx/docs/Status/Cxx20Papers.csv
The file was modifiedlibcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.floating_point.pass.cpp
The file was modifiedlibcxx/include/__format/format_fwd.h
The file was modifiedlibcxx/docs/Status/Cxx2bIssues.csv
The file was modifiedlibcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.bool.pass.cpp
The file was modifiedlibcxx/include/__format/format_arg.h
The file was modifiedlibcxx/include/module.modulemap
The file was modifiedlibcxx/include/__format/format_args.h
The file was modifiedlibcxx/test/std/utilities/format/format.arguments/format.arg.store/make_format_args.pass.cpp
The file was modifiedlibcxx/test/std/utilities/format/format.arguments/format.arg/operator_bool.pass.cpp
The file was modifiedlibcxx/test/std/utilities/format/format.functions/format_tests.h
The file was modifiedlibcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.string.pass.cpp
The file was modifiedlibcxx/include/CMakeLists.txt
The file was modifiedlibcxx/test/libcxx/utilities/format/format.arguments/format.arg/visit_format_arg.pass.cpp
The file was modifiedlibcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp
The file was modifiedlibcxx/include/format
The file was modifiedlibcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp
The file was modifiedlibcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.c_string.pass.cpp
The file was modifiedlibcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.handle.pass.cpp
The file was modifiedlibcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.pointer.pass.cpp
The file was modifiedlibcxx/test/std/utilities/format/format.arguments/format.arg.store/make_wformat_args.pass.cpp
The file was modifiedlibcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp
The file was addedlibcxx/include/__format/format_arg_store.h
The file was removedlibcxx/test/std/utilities/format/format.arguments/format.arg.store/class.pass.cpp
The file was modifiedlibcxx/test/libcxx/private_headers.verify.cpp
Commit 5ac411aea802f5983b7979b9198ba7d8fb38f64d by yusra.syeda
[SystemZ][z/OS] Add the PPA1 to SystemZAsmPrinter

Differential Revision: https://reviews.llvm.org/D125725
The file was modifiedllvm/test/MC/GOFF/ppa1.ll
The file was addedllvm/include/llvm/BinaryFormat/GOFF.h
The file was modifiedllvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
The file was modifiedllvm/lib/Target/SystemZ/SystemZAsmPrinter.h
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was modifiedllvm/include/llvm/MC/MCContext.h
The file was modifiedllvm/lib/MC/MCContext.cpp
The file was modifiedllvm/lib/MC/MCObjectFileInfo.cpp
The file was modifiedllvm/include/llvm/MC/MCObjectFileInfo.h
The file was modifiedllvm/include/llvm/MC/MCSectionGOFF.h
Commit f0c06c042040fd8e7f296a66f1253e571610e64b by koraq
[libc++][format][5/6] Improve format_to_n.

Use a specialized buffer wrapper to limit the number of insertions in the
buffer. After the limit has been reached the buffer only needs to count
the number of insertions to return the buffer size required to store the
entire output.

Depends on D110498

Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D110499
The file was modifiedlibcxx/include/format
The file was modifiedlibcxx/include/__format/buffer.h
Commit e64722f686bd8a6d0c2c099ce6fb90e84f51341d by phosek
[CMake][Fuchsia] Build runtimes as universal libraries on OS X

We want to build libunwind, libc++abi and libc++ as universal libraries
supporting both x86_64 and arm64 architectures.

Differential Revision: https://reviews.llvm.org/D125908
The file was modifiedclang/cmake/caches/Fuchsia.cmake
The file was modifiedclang/cmake/caches/Fuchsia-stage2.cmake
Commit f8ae591fc985cc0ba397cbd60e227b21c045bb81 by michaelrj
[libc] fix missing semicolon in bsd_ext.td

Fix typo in previous commit

Differential Revision: https://reviews.llvm.org/D125913
The file was modifiedlibc/spec/bsd_ext.td
Commit e60c8c301ce64ae42dcb469d727d22833a31e17a by llvmgnsyncbot
[gn build] Port 4d8268fbf4cd
The file was modifiedllvm/utils/gn/secondary/libcxx/include/BUILD.gn
Commit d4257fbbba234cdbb8d1973c508ee1aa1adcb4f2 by martin
[llvm-readobj] Improve printing of Windows ARM packed unwind info

Fix a couple minor details in the existing logic for calculating
saved registers and stack adjustment.

Synthesize the corresponding prologues and epilogues and print them.
(This supersedes the previous printout of one single list of stored
registers; as there's lots of minor nuance differences in how
registers are pushed/popped in various corner cases, it's better to
print the full prologue/epilogue instead of trying to condense it
into one single list.)

Print the raw values of the fields Reg, R, L (LinkRegister) and C
(Chaining) instead of only printing the derived values.

Differential Revision: https://reviews.llvm.org/D125644
The file was modifiedllvm/tools/llvm-readobj/ARMWinEHPrinter.h
The file was modifiedllvm/tools/llvm-readobj/ARMWinEHPrinter.cpp
The file was modifiedllvm/include/llvm/Support/ARMWinEH.h
The file was modifiedllvm/lib/Support/ARMWinEH.cpp
The file was addedllvm/test/tools/llvm-readobj/COFF/arm-unwind-packed.s