[clang][Modules] Use strict comparison at build-session validation boundary (#197203)
The relocation check used `IFVT >= session` while input validation used
`IFVT > session`, silently skipping the relocation check when both
landed in the same truncated second. Share a single helper with the
strict comparison. This was noticed when the accompanying test was flaky
on green dragon macOS bot.
Also:
* Drop the test's `sleep 1` timing dependency by future-dating the
session timestamp directly.
* Remove the dead `touch %t/session.timestamp` lines in the
ClangScanDeps test (the scanner ignores the file's mtime).
hopefully resolves: rdar://173816745
[clang] implement CWG2064: ignore value dependence for decltype
The 'decltype' for a value-dependent (but non-type-dependent) should be known,
so this patch makes them non-opaque instead.
This patch also implements what's neceessary to allow overloading
on pure differences in instantiation dependence, making `std::void_t`
usable for SFINAE purposes.
This also readds a few test cases from da98651, which was a previous attempt
at resolving CWG2064.
Fixes #8740
Fixes #61818
Fixes #190388
[CIR] Fix problems with stale insert locations (#197296)
This change fixes three places where we were copying the builder rather
than getting a reference to it, leading to potential problems with
incorrect state, including insert locations. Two of these cases were
causing observable problems, and I'm adding regression tests for those.
The third doesn't seem to have caused any actual problems, but I'm
changing it to avoid potential problems in the future.
Assisted-by: Cursor / claude-opus-4.7-thinking-xhigh
[BoundsSafety][NFC] Introduce LateParsedTypeAttribute for late-parsed type attributes (#192799)
Preparatory refactoring for llvm/llvm-project#179612. The new late
parsing approach needs a distinct data structure to carry
type-attribute-specific information through the late parsing pipeline,
separate from declaration-level late-parsed attributes.
- Add LateParsedTypeAttribute subtyping LateParsedAttribute
- Add ParseLexedTypeAttribute and LateTypeAttrParserCallback to Parser
- Extract the shared token setup, parsing, and cleanup logic from
ParseLexedCAttribute and ParseLexedTypeAttribute into a common
ParseLexedCAttributeTokens helper.
[DirectX][ObjectYAML] Add ILDN part support (#194508)
Add support for DXContainer ILDN part in the ObjectYAML pipeline so it
can be represented in structured YAML and round-tripped through
yaml2obj/obj2yaml.
ILDN part is meant to store the name of PDB file that contains shader
debug info.
[Instrumentor] Add unreachable support; unreachable stack trace printing
Allow to instrument unreachable and provide a use case to identify an
unreachable was reached.
[Instrumentor] Add Alloca and Function support; stack usage example
This adds support for alloca instrumentation and function pre/post
instrumentation. Alloca support follows load/store support directly.
Functions require special care to determine the insertion points.
Together, we can showcase how the stack high watermark can be profiled,
see InstrumentorStackUsage.cpp.
[Instrumentor] Use the pass builder's FileSystem for reading files
In the IO sandbox, the old read calls caused the CI to fail. This
changes uses the PassBuilder's FileSystem the same way other passes
read files from disk (during CI).
[Instrumentor] Use the pass builder's FileSystem for reading files
In the IO sandbox, the old read calls caused the CI to fail. This
changes uses the PassBuilder's FileSystem the same way other passes
read files from disk (during CI).
[Instrumentor] Add Alloca and Function support; stack usage example
This adds support for alloca instrumentation and function pre/post
instrumentation. Alloca support follows load/store support directly.
Functions require special care to determine the insertion points.
Together, we can showcase how the stack high watermark can be profiled,
see InstrumentorStackUsage.cpp.
[scudo] Add a generic allocation fuzzer. (#197317)
The fuzzer disabled memory tagging if supported since there is an
unknown problem with trying to create an allocator instance and doing
raw allocate/deallocate calls.
[Instrumentor] Add Alloca and Function support; stack usage example
This adds support for alloca instrumentation and function pre/post
instrumentation. Alloca support follows load/store support directly.
Functions require special care to determine the insertion points.
Together, we can showcase how the stack high watermark can be profiled,
see InstrumentorStackUsage.cpp.
[Instrumentor] Use the pass builder's FileSystem for reading files
In the IO sandbox, the old read calls caused the CI to fail. This
changes uses the PassBuilder's FileSystem the same way other passes
read files from disk (during CI).
[DirectX][NFC] Move DICompileUnit conversion into DXILDebugInfo (#196451)
In #192574, I added logic for changing versioned language names to
unversioned language names, but did so directly in DXILBitcodeWriter.
This is better done in DXILDebugInfo instead so that, in a future
change, we can check the result of DXILDebugInfo in tests.
[Instrumentor] Add a global function regexp to limit the instrumentation
Only functions that match the "function_regex" will be instrumented,
or if they have the instrumentation attribute.
[lldb][windows] mark test_overrides_resolver_resolver_cmd as XFAIL (#197285)
Follow up to https://github.com/llvm/llvm-project/pull/195392 to mark
`test_overrides_resolver_resolver_cmd` as XFAIL on Windows, like
`test_overrides_resolver_resolver_python`.
[APFloat] Add exp functions for single and double using exp/expf implementations from LLVM libc. (#190667)
This reapplies #143959 with some changes:
- Only support default rounding modes for now. Other rounding modes will
wait for proper static rounding implementations in LLVM libc.
- Add both single and double precision exp.
[BOLT] Account for stubs with symbols in plt (#192716)
LLD and bfd do not generate functions symbols for stubs in PLT. However,
mold does and trips the object discovery to create two functions (BF
then PLTFunc). This can cause symbol to be resoved with BF with
incorrect ADRP immediate field in AArch64.
The issue is described in more detail here:
https://github.com/llvm/llvm-project/issues/192552
[Instrumentor] Add a global function regexp to limit the instrumentation
Only functions that match the "function_regex" will be instrumented,
or if they have the instrumentation attribute.
[LFI] Report reserved register modification in error message (#195160)
Reports the name of the modified reserved register in the error message.
Updates the MCLFIRewriter error infrastructure to take a Twine for this.
Also adds a warning function, which will be useful in future cases where
the rewriter sees an unknown instruction/addressing mode, but will pass
it through anyway.
Fixes #192027.