[flang][FIR] Make fir.type a valid memref element type (#199236)
Implement `MemRefElementTypeInterface` on `fir::RecordType` so that
`memref<!fir.type<…>>` verifies, enabling downstream passes to use
memrefs of Fortran derived types.
[clang-tidy] Change IgnoreExternC default to true in modernize-use-using (#199189)
This prevents generating invalid C code in mixed-language headers by
leaving `typedef` declarations inside `extern "C"` blocks intact by
default.
Fixes #141394
[clang] Use FileError in FileManager::getFileRef, getDirectoryRef (#199126)
Most callers are unchanged, since they either ignore the specific error
or have their own formatting of the error that includes both the path
and the errorToErrorCode-unwrapped value. However, for clients that just
forward the error it's helpful to ensure we do not lose track of the
filename that the error is associated with, so use FileError.
Incidentally remove two uses of errorToErrorCode that were being used
instead of consumeError; in both cases getOptionalFileRef was more
appropriate.
[lldb] Adopt LockedPtr in Module (NFC) (#199160)
Follow-up to #198941, which introduced Locked<T> and SharedLocked<T>.
Add GetObjectFileLocked, GetSymbolFileLocked, GetSymtabLocked, and
GetSectionListLocked alongside the existing accessors.
The locked variants cover two things:
1. They prevent the pointer from being swapped out from under the
caller. The old getters take m_mutex only during lazy initialization and
release it before returning. The unique_ptr or shared_ptr that owns the
pointee can therefore be reassigned by another thread while the caller
still holds the raw value. LockedPtr keeps the Module mutex held
alongside the borrowed pointer, pinning the binding for the lifetime of
the handle.
2. They serialize access to the pointee itself. This is not new, the
classes in question were already relying on the Module mutex for
synchronization.
[5 lines not shown]
[LV] Avoid stale VPTypeAnalysis cache in convertToStridedAccesses (#199222)
VPlanTransforms::convertToStridedAccesses calls
VPWidenMemoryRecipe::computeCost, which uses VPTypeAnalysis in
VPCostContext to infer the pointer type of the load address. However,
CachedTypes in VPTypeAnalysis may be invalidated since earlier
transformations in tryToBuildVPlan could erase recipes from the plan.
This pollutes the cache with stale types.
Fix this by creating a new VPCostContext locally scoped to
convertToStridedAccesses, ensuring VPTypeAnalysis reflects the current
plan state. This serves as a quick fix to prevent accidental reuse by
future transformations.
[lldb] Fix dummy target filtering regression in CommandInterpreter (#198949)
In #198429 (reland), CommandObject::GetTarget() was tightened to return
nullptr instead of the dummy target when no real target exists, unless
the command explicitly opts in via eCommandAllowsDummyTarget or standard
target requirements
However in CommandInterpreter::GetExecutionContext(bool
adopt_dummy_target) :
```
ExecutionContext
CommandInterpreter::GetExecutionContext(bool adopt_dummy_target) const {
return !m_overriden_exe_contexts.empty()
? m_overriden_exe_contexts.top()
: m_debugger.GetSelectedExecutionContext(adopt_dummy_target);
}
```
[31 lines not shown]
[clang] ast-text-dump: fix printing of declref to decomposition with no bindings (#199215)
Clang supports empty structured binding groups as an extension, and the
text node dumper has some special handling for giving a name to
anonymous declarations, which assumed a decomposition would have at
least one binding.
Fixes #198842
[lldb][test] Fix thread safety analysis warning in LockedTest (#199218)
Guard `mutex.unlock()` with `if (mutex.try_lock())` to satisfy thread
safety analysis. Statically, the compiler cannot verify that
`mutex.try_lock()` succeeded when it is only asserted by `EXPECT_TRUE`,
leading to a "releasing mutex 'mutex' that was not held" compilation
error.
This fixes a regression introduced in #198941.
[PowerPC] Change arguments of PPCEmitTimePseudo
Like #198861 but for PPCEmitTimePseudo.
This is not NFC. The asm name of LDtocBA was set to #LDtocCPT,
which is the name of the instruction before. This looks like a
cut`n`paste error, and I changed the asm name.
workflows/require-release-manager: Refactor to check an arbitrary team (#199083)
This will allow it to be used for checking that users are members of the
llvm-committer team or possibly others.