[lldb] Use llvm::sys::RWMutex instead of std::shared_mutex (NFC) (#197847)
On Darwin, pthread_rwlock is faster than std::shared_mutex, which is why
the implementation of llvm::sys::RWMutex used that on our platform.
Everywhere else, it uses std::shared_mutex under the hood.
Also see #70151
rdar://177113951
[Bazel] Port ca6e386cbf5b3e75a2a62e6c4d29b24109727a52 (#197841)
obj2yaml now depends on MC (although probably not for much), and remove
an unnecessary header creating a layering violation.
[Flang][OpenMP][Offload] Modify MapInfoFinalization to handle attach mapping and 6.1's ref_* and attach map keywords (#177715)
This PR is one of four required to implement the attach mapping
semantics in Flang, alongside the ref_ptr/ref_ptee/ref_ptr_ptee map
modifiers and the attach(always/never/auto) modifiers.
This PR is the MapInfoFinalization changes required to support these
features, it mainly deals with applying the correct attach map type and
manipulating the descriptor types maps for base address and descriptor
so that when we specify ref_ptr/ref_ptee we emit one of the two maps and
when we emit ref_ptr_ptee we emit our usual default maps. In all cases
we add the "glue" of an new attach map except in cases where a user has
provided attach never. In cases where we are provided an always, we
apply the always map type to our attach maps.
It's important to note the runtime has a toggle for the auto map
behavior, which will flip the attach behavior to the newer semantics or
the older semantics for backwards compatibility (outside the purview of
this PR but good to mention).
[LifetimeSafety] Recognize declarations nested under std namespace (#197604)
Previously `isInStlNamespace()` only checked the immediate declaration
context. This missed declarations nested below `std` through records or
intermediate namespaces, such as `std::basic_string_view` constructors.
This commit fixes the problem by walking the `DeclContext` chain in
`isInStlNamespace`.
Closes #197454
Cloud releases: Switch to firstboot_pkg_upgrade
Cloud images are deployed with base system packages. Introduce a
firstboot package auto updater to patch the base system on first boot.
Approved by: re (cperciva)
MFC after: 1 hour
MFC to: stable/15
Reviewed by: cperciva
Sponsored by: Google Cloud
Differential Revision: https://reviews.freebsd.org/D56890
(cherry picked from commit 464a351267dc0d1843b919dd72ad1c70c24815ce)
(cherry picked from commit 0bb2b2a45f3c0c147d7c55e010be45e55af8df87)
[OpenMP][MLIR] Modify OpenMP Dialect lowering to support attach mapping (#179023)
This PR adjusts the LLVM-IR lowering to support the new attach map type
that the runtime uses to link data and pointer together, this swaps the
mapping from the older OMP_MAP_PTR_AND_OBJ map type in most cases and
allows slightly more complicated ref_ptr/ptee and attach semantics.
If the main process receives an oversized passwd or group entry message from
the ldap client process, discard it rather than overflowing the struct
idm_req on the stack.
Pointed out by Frank Denis
ok claudio@
[clang][NFC] Remove `macro_begin` and `macro_end` from `Preprocessor` (#197817)
Use `macros()` wherever posible. This gives us the following advantages:
1. We can use the range-base for loop for simpler looking code.
2. We more ergonomically use algorithms.
3. We can avoid the duplicate work of checking if we need to call
`ExternalSource->ReadDefinedMacros()` that was in both `macro_begin` and
`macro_end`. In some cases, we save this extra work once per loop
iteration, not just one extra total.
4. No user confusion deciding which version they should call
5. Reduce the size of `Preprocessor.h` and the number of members in
`Preprocessor`.
Using `macros` ends up being the better solution in every case, so since
all callers were migrated from `macro_begin` and `macro_end` to
`macros`, get rid of `macro_begin` and `macro_end`.
---------
Co-authored-by: Victor Chernyakin <chernyakin.victor.j at outlook.com>
[lldb][Clang] Removed redundant code in DWARFASTParserClang (#197802)
decl_up is initialized here but doesn't appear to be used or moved
anywhere before it goes out of scope. If the Declaration info isn't
needed for the FunctionSP, it should probably be removed.
[clang] Implement constexpr DesignatedInitUpdateExpr. (#196427)
DesignatedInitUpdateExpr exists to handle some obscure edge cases in C,
where the usual InitListExpr canonicalization can't be performed.
Previously, we didn't need constant evaluation for this, but C23
constexpr means we need to evaluate this before codegen.
Implementation is mostly straightforward: just need to evaluate the two
subexpressions, in order, and skip any NoInitExprs.
Along the way, I ran into an issue with the way we manage array APValues
for non-bytecode constant evaluation; fix reallocation to work
correctly.
Fixes #193373. Fixes #196450.