[clang-sycl-linker] Add static archive (.a) support (#202829)
Add support for static archives of LLVM bitcode files to
clang-sycl-linker. The archive member-selection engine (a symbol-driven
fixed-point lazy extraction loop) is simplified to bitcode-only
handling.
clang-sycl-linker gains -l/--library,
--whole-archive/--no-whole-archive, and -u/--undefined options. The
previous --bc-library option is removed in favor of the standard -l
mechanism. Inputs (positional files and -l libraries) are now resolved
to in-memory buffers; archive members are pulled in lazily only when
they resolve undefined symbols, and bitcode is loaded with
parseBitcodeFile.
Co-Authored-By: Claude
---------
Co-authored-by: Yury Plyakhin <yury.plyakhin at intel.com>
Teach LLDB's pretty-printer about libc++'s various `std::vector` layouts (#202438)
PR #155330 changes `std::vector` from unconditionally using three
pointers to represent its layout to potentially using three pointers or
a begin pointer and two integers. This commit changes LLDB so that it
can robustly work with the legacy vector layout, the new pointer layout,
and the new size-based layout.
[clang-format] Fix crash on assert !Scopes.empty() in parseBrace() (#199100)
Fixes #199017
When angle-bracket parsing fails and resets the token stream, a closing
brace can be consumed twice through `parseConditional()`, each time
popping one entry from Scopes. This leaves Scopes empty when
`parseBrace()` encounters the legitimate closing brace, triggering the
assertion.
Replace the assert with a graceful return false, consistent with the
existing unbalanced-brace handling in `consumeToken()`.
[lld][MachO] Add N_COLD_FUNC support (#183909)
Parse `N_COLD_FUNC` from input object files and use it to move cold
functions to the end of __text, after all non-cold and ordered symbols.
Key behaviors:
- Cold functions are placed after all non-cold unordered symbols.
- Order file entries take precedence over the cold attribute: a cold
function listed in the order file retains its specified position.
- BP interaction: utilize the subgrouping introduced in #185661 to split
`N_COLD_FUNC` sections into a distinct subgroup.
- ICF interaction: when a non-cold section is folded into a cold master,
the master's coldness is unset. With safe_thunks, cold
address-significant functions get cold thunks placed in the cold region.
- The `N_COLD_FUNC` flag is stripped from the output symbol table.
[CIR] Store Expand fields into the parameter alloca
Rework the callee-side reassembly of Expand (flattened-struct) arguments in
CallConvLowering. Instead of building a scratch alloca, storing each field
into it, reloading the whole struct, and replacing the struct block
argument's uses, store each expanded field block argument directly into the
parameter's own alloca -- the slot CIRGen already spills the by-value struct
into -- and erase the original whole-struct store. This keeps the alloca's
variable name and `init` flag and drops the reassemble-then-reload
roundtrip. The struct argument's only use is that spill store, asserted
here.
At the call site, when an Expand operand is a load of an alloca, read each
member directly from that alloca (get_member + load) at the original load's
position and drop the now-dead whole-struct load; fall back to
cir.extract_member when the operand has no source alloca (a call result,
constant, etc.).
Also fold the Ignore-drop into a single forward running-index pass over the
[2 lines not shown]
[lldb][Windows] Append access-violation detail to lldb-server stop description (#203301)
`lldb-server.exe` reports access violations with only the bare exception
code (e.g. `Exception 0xc0000005 encountered at address 0x...`), while
the in-process Windows debugger produces the much more useful `Access
violation
reading location 0x...` / `writing` / `DEP at` form.
This patch lifts the in process helper into a method of the
`ExceptionRecord` class to allow both Windows plugins to use it.
This fixes `exception_access_violation.cpp` with
`LLDB_USE_LLDB_SERVER=1`.
rdar://179366768