[lld][MachO] Handle compact unwind entries with no matching symbol (#180009)
Context: This change is to support [MachO basic block hot-cold
splitting](https://discourse.llvm.org/t/rfc-support-fsplit-machine-functions-on-macho-arm64/89739)
- though it's presented below outside of this context.
Compact unwind entries can reference function addresses that have no
corresponding symbol in the object's symbol table (e.g. functions with
temporary local labels). Previously, this would trigger an assertion
failure in assert-enabled builds, or silently drop the unwind entry in
release builds, resulting in missing unwind info at runtime.
Fix this by synthesizing a local `Defined` symbol when no symbol exists
at the target address of a compact unwind entry, so that unwind info is
correctly emitted.
[Assisted-by](https://t.ly/Dkjjk): Cursor IDE + claude-opus-4.6-high +
gpt-5.2-xhigh
[clang-offload-bundler] Convert `std::vector` to `llvm::SmallVector` in `OffloadBundlerConfig` (#192259)
Replace `std::vector<std::string>` with `llvm::SmallVector<std::string,
4>`
for TargetNames, InputFileNames, and OutputFileNames to avoid heap
allocation for small number of elements.
[HLSL] Add InterlockedAdd HLSL functions (#195742)
This PR adds the `InterlockedAdd` function to HLSL.
For now, only integer references are accepted: resources passed as a
parameter, and this function as a member method to certain resources,
will be addressed in a separate PR.
Addresses https://github.com/llvm/llvm-project/issues/99122
Assisted by: Github Copilot
[test][Support] Disable CFI-icall for DynamicLibrary Overload test (#202446) (#202684) (#202794)
The test performs manual symbol lookup and calls, which triggers
Control Flow Integrity indirect call checks.
Reland of #202446 and #202684 reverted with #202550 #202446.
Here we are going to use LLVM_NO_SANITIZE and check `__clang__`.
[lldb] Drop prefix & offset arguments in ParseTrieEntries (#202805)
I addressed Dave's review feedback locally but forgot to push the fix to
the PR branch. This removes the prefix and offset arguments from the
public API.
[lldb][docs] Drop stale Python 2 note from caveats page (NFC) (#202754)
Remove the Python 2 section from the caveats page. Python 2 has been
end-of-life since 2020 and is no longer shipped with current macOS, so
the xcrun guidance for it and the deprecation note are no longer useful.
As promised in #201256.
[flang][OpenMP] Remove CheckSymbolName{,s}, NFC
These functions checked if each OmpObject had a symbol, and emitted
a diagnostic if not. Name not having a symbol is an internal compiler
error (at least now), and will be detected separately.
Remove these functions since they don't serve any purpose anymore.
Fix several migration artifacts
- Lines starting with `%` are markdown line comments. This comes up
often when LLVM IR value names end up starting a new line in prose.
- Fix indentation in a few cases
- Use > prefix for intended block quote sections.
- Fix the VP section heading, the two-line "" heading underline wasn't
caught in the initial migration.
[DirectX] Move getNonDXILAttributeMask to DirectXIRPasses (#202781)
DXILDebugInfo.cpp uses it and is part of DirectXIRPasses, but
DXILPrepare.cpp defined it and is part of DirectXCodeGen. DirectXCodeGen
has a dependency on DirectXIRPasses, so we cannot also add a dependency
from DirectXIRPasses back on DirectXCodeGen, and we need to move the
definition of getNonDXILAttributeMask() instead.
Fixes: #201336
Handle objc_msgSend being a re-export symbol from libobjc.A.dylib. (#202776)
In some cases, objc_msgSend and the objc_msgSendSuper can be re-exported
symbols in libobjc.A.dylib. Handle that case here. There were a number
of failures in the ObjC stepping tests before this was handled, so we
didn't need more tests.
If there isn't a re-exported symbol, we'll fall back to a code symbol.
---------
Co-authored-by: Jonas Devlieghere <jonas at devlieghere.com>
[lldb] Adjust TestObjectFileMachO.cpp for macOS 27 (#202792)
In macOS 27 (and accompanying device OSes), objc_msgSend was moved out
of the libobjc dylib into other system dylibs.
The simplest fix is to use a different symbol from libobjc.
[flang] Support declarations scoping in FIR AA. (#201216)
Further experimentation with MLIR inlining showed that
FIR AA becomes more conservative once a subprogram is inlined.
For example:
```
subroutine caller(p1,p2)
real, pointer :: p1,p1
call callee(p1,p2)
end
subroutine callee(a1,a2)
real :: a1,a2
a1 = a2
end
```
After `callee` is inlined, FIR AA assumes that `a1` and `a2`
alias at the point of the assignment, because it classifies them
[7 lines not shown]
[lldb] Fix infinite recursion in Mach-O export trie parsing (#202773)
A malformed (or hostile) export trie whose child offset points back to a
node already on the path from the root (a cycle) made ParseTrieEntries
recurse forever and overflow the stack.
Track the node offsets visited during the walk and reject any trie that
revisits one. Add unit tests for a self-cycle and a back-edge cycle.
[OpenMP] Use ext linkage for kernels handles and globals handles keep linkage
Host handles are now emmitted with external linkage to clash if two
kernels with the same name are registered. This could have happen right
now and silently corrupt the program, but it can happen more easily once
we allow users to name their kernels.
In the same patch we make global variable handles retain the linkage of
the global variable, forcing clashes for external ones and continue to
support weak use cases. The exception is common linkage, which we
transform into weak for the entry as there is no zero initialization.
[Dexter] Allow fetching "scopes" from the debugger
To further improve Dexter's script writing ability, this patch starts
implementing the ability for Dexter to fetch all variables with in a given
"scope", as defined by the DAP "scopes" request. This allows the test to
collect all available variables without needing to specify them explicitly
in the script, aiding in fast script generation/re-generation.
This patch does not add any script-writing functionality, but adds the
!value/all Node, which fetches all variable values from the given scope, and
enables fetching these values from DAP-based debuggers.
Merge branch 'users/ziqingluo/PR-178856689' of github.com:llvm/llvm-project into users/ziqingluo/PR-178856689
Conflicts:
clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowTest.cpp