[Instrumentor] Add support for modules and globals
We can emit callbacks when a module is loaded/unloaded and before
globals are initialized. Both happens in newly introduced constructors
and destructors.
[Windows][test] Fix "LLVM" test failures when LLVM_WINDOWS_PREFER_FORWARD_SLASH is ON (#184556)
This patch fixes several LLVM test failures on Windows that occur when
the LLVM_WINDOWS_PREFER_FORWARD_SLASH CMake option is enabled.
The failures were caused by tests either hardcoding backslash
expectations in FileCheck or constructing paths with strict backslashes
in C++ unit tests, both of which break when the environment is
configured to prefer forward slashes.
Specific changes:
- `llvm-cov` lit tests: Changed the path separators with
`-DSEP=%{fs-sep}`.
- `llvm-objdump` lit test: Relaxed
`source-interleave-prefix-windows.test` to accept either forward or
backward slashes using the `{{[/\\]}}` regex. This makes the path
matching resilient to the underlying separator preference without losing
precision.
- CommandLineTest.cpp: Conditionalized the TestRoot variable to use
[5 lines not shown]
[Instrumentor] Add a property filter for static properties
The user can define static filters in the json to limit instrumentation
to opportunities that match the static expression, e.g., is_volatile==1.
The matcher logic is pretty basic for now. Integer comparisons, pointer
null checks, string equalities and startswith are supported.
The commit was prepared with Claude (AI) and modified/tested by me.
[llvm] Add a tablegen !sort operator (#197303)
This operator creates a new ``list`` containing the same elements as
*list*
but in sorted order. To determine the order, TableGen binds the variable
*var* to each element and evaluates the *key* expression, which
presumably
refers to *var*. The key must produce a ``string`` or integer value
(``bit``, ``bits``, or ``int``); all keys must be of the same type.
Elements
with equal keys preserve their original relative order, resulting in a
stable
sort.
For example, to sort a list of records by their ``Name`` field::
` list<Thing> sorted = !sort(t, Things, t.Name);`
[Offload] Make 'llvm-offload-binary' use multi-binaries (#197456)
Summary:
There's two ways you can put multiple binaries in the section. Either
use the version two multi-binary support or just concatenate them. This
PR changes the llvm-offload-binary tool to use the multi-support rather
than directly concatenating them.
The motivation for this is to save space and make it easier to support
compression in the future. Compression would be a flag in the header and
the compression is only really valuable if it can combine the
architecture variants. ELF section compression is a little spotty but
would be another good solution.
devel/py-pytest-mock: Update to 3.15.1
Tweaks on top of the PR patch:
- Use DISTVERSION (referenced by ${DISTVERSION} in DISTNAME) instead
of PORTVERSION.
- Add py-wheel to BUILD_DEPENDS (required by USE_PYTHON=pep517 with the
setuptools build backend).
- Bump pytest dep to >=6.2.5 to match upstream pyproject.toml.
PR: 273337
Submitted by: takefu
nfscl: Disable use of callbacks for NFSv4.0
The only use for callbacks for NFSv4.0 is delegations
and delegations rarely work well for NFSv4.0 anyhow.
Therefore, this patch disables callbacks for the
NFSv4.0 client. This is the same behavior as
occurred when the nfscbd(8) daemon was not running.
This change allowed a function called nfscl_getmyip()
to be removed from the kernel, which is nice since
maintaining this function was bothersome, due to its
use of routing, etc.
(cherry picked from commit 71ac1ec5c9d990e7881e75f04140eb0bfe473a21)
[lldb] Support building test inferiors without debug info (#197002)
Add first class support for building test inferiors without debug info,
instead of having to pass `-g0` in the Makefile or the build dictionary.
```
def test(self):
self.build(debug_info="none")
```
rdar://164923931
[AMDGPU] Validate forced lit() immediate
Right now it takes validation path of an inline constant if fits
even though it is forced to literal encoding.
[clang-sycl-linker] Migrate tests from Driver/ to Tooling/ and use LLVM IR input (#197566)
1. Replace the C++ source test that required compiling with %clangxx and
separate Input files with self-contained .ll tests using split-file.
2. Split the test into two files:
- clang-sycl-linker.ll: basic tool behavior (link, dev libs, AOT,
errors)
- clang-sycl-linker-split-mode.ll: device code split mode handling
Co-Authored-By: Claude
[clang] NFC: add asserts enforcing template parameters have valid positions
Some tests are violating these assertions, so they are commented out.
Most of these are alias CTAD tests, with a couple of lambda in concepts tests on
top of that.
For the test in `clang/test/SemaTemplate/concepts.cpp`, that was broken by #195995
and needs a partial revert at least.