7220 Commits

Author SHA1 Message Date
vabridgers
c71bbd50a1
[analyzer] Correct Z3 test cases, fix exposed crashes (#146597)
PR145731 corrected the analyzer test runner to consider use of z3 when
used by testcases, which exposed problems in test cases PR37855.c and
crashes in z3-crosscheck.c This change fixes those crashes and
re-enables the test cases that were "XFAIL"'d out.

Co-authored-by: einvbri <vince.a.bridgers@ericsson.com>
2025-07-03 09:08:00 -05:00
Abhina Sree
a4d517dc38
[SystemZ][z/OS] Fix error about const char in Text Encoding (#146727)
This patch fixes the following error:
```
llvm/lib/Support/TextEncoding.cpp:274:11: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *'
  274 |     char *Input = InputLength ? const_cast<char *>(Source.data()) : "";
      |           ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
2025-07-02 13:45:52 -04:00
Stephen Tozer
35626e97d8
[DLCov] Origin-Tracking: Enable collecting and symbolizing stack traces (#143591)
This patch is part of a series that adds origin-tracking to the debugify
source location coverage checks, allowing us to report symbolized stack
traces of the point where missing source locations appear.

This patch adds a pair of new functions in `signals.h` that can be used
to collect and symbolize stack traces respectively. This has major
implementation overlap with the existing stack trace
collection/symbolizing methods, but the existing functions are
specialized for dumping a stack trace to stderr when LLVM crashes, while
these new functions are meant to be called repeatedly during the
execution of the program, and therefore we need a separate set of
functions.
2025-07-02 12:01:17 +01:00
Martin Storsjö
163871c2d2
[Support] Remove workarounds for building with mingw.org toolchains (#145683)
Assume that mingw builds are made with mingw-w64 headers.

The old mingw.org distribution isn't even accessible at the moment, and
their project hosting site (osdn.net) seems to have been down for a
couple of years, and their old project hosting (at sourceforge.net)
hasn't been updated since 2018.
2025-06-26 13:23:42 +03:00
Tomohiro Kashiwada
bd96918f01
[LLVM][Support][Cygwin] Add threading support for Cygwin host (#145314)
Cygwin environment has pthread functionality but LLVM integration
doesn't care it nor provide fallback.
Using Linux integration for Cygwin works fine.
2025-06-24 17:18:28 +03:00
Martin Storsjö
7a4b392559
[Support] Remove an outdated MinGW workaround (#145294)
mingw-w64 has had the _HEAPOK define since the initial commits in 2007;
unclear when/where it was added for mingw.org headers, but it does seem
to exist there as well (at least in versions from 2011).

This workaround stems from 53fbecce6e8b7d1f024e3dc6df4160fe9a577ff1 from
2004 - it is no longer relevant today.
2025-06-24 17:13:44 +03:00
Andrew Rogers
a88e655809
[llvm] build Blake3 source with LLVM_EXPORTS defined (#144753)
## Purpose
This patch ensures that the BLAKE3 implementation in the LLVM Support
library exports its public interface with `__declspec(dllexport)` when
building LLVM as a Windows DLL.

## Background
The effort to support building LLVM as a Windows DLL is tracked in
#109483. Additional context is provided in [this
discourse](https://discourse.llvm.org/t/psa-annotating-llvm-public-interface/85307).

## Overview
Replicate [this
logic](https://github.com/llvm/llvm-project/blob/main/llvm/cmake/modules/AddLLVM.cmake#L662-L664)
from `llvm_add_library()` for the `LLVMSupportBlake3` target. Without
this change, the `llvm_blake_` functions will only be annotated with
`__declspec(dllimport)` when building LLVM as a Windows DLL which leads
to inconsistent DLL linkage warnings from MSVC and `clang-cl`.
2025-06-18 13:08:05 -07:00
Sirraide
9ae4d2e013
[LLVM] [Support] Disable ioctl() terminal size check on Solaris (#144600)
#143514 broke the `clang-solaris11-sparcv9` bot; from what I can tell
that’s Solaris and according to `SolarisTargetInfo::getOSDefines`, the
macro `__sun__` should be defined on Solaris, so check for that and
don’t try to query the terminal size if it is defined.

Not sure this is the best solution but hopefully it fixes the bot.
2025-06-17 22:44:02 +02:00
Sirraide
b4e39e4ff9
[LLVM] [Support] Query the terminal width using ioctl() (#143514)
On unix systems, we were trying to determine the terminal width using
the `COULMNS` environment variable. Unfortunately, `COLUMNS` is not 
exported by all shells and thus not available on some systems.

We were previously using `ioctl()` for this; fall back to doing so if `COLUMNS`
does not exist or does not store a positive integer.

This essentially reverts a3eb3d3d92d037fe3c9deaad87f6fc42fe9ea766 and
parts of https://reviews.llvm.org/D61326.

For more information, see #139499.

Fixes #139499.
2025-06-17 15:03:37 +02:00
Abhina Sree
be9994b092
[SystemZ][z/OS] Refactor AutoConvert more (#143955)
This patch removes the C++
disablezOSAutoConversion,enablezOSAutoConversion declarations and also
updates Path.inc to use the common function.
2025-06-13 07:00:36 -04:00
Abhina Sree
22fd11fe66
[SystemZ][z/OS] Refactor AutoConvert.h to remove large MVS guard (#143174)
This AutoConvert.h header frequently gets mislabeled as an unused
include because it is guarded by MVS internally and every usage is also
guarded. This refactors the change to remove this guard and instead make
these functions a noop on other non-z/OS platforms.
2025-06-11 15:26:49 -04:00
jeremyd2019
d659364295
[Support][Cygwin] Fix handling of Process symbol lookup. (#143072)
In Unix/DynamicLibrary.inc, it was already known that Cygwin required
use of `RTLD_DEFAULT` as the `Handle` parameter to `DLSym` to search all
modules for a symbol. Unfortunately, RTLD_DEFAULT is defined as NULL, so
the existing checks of the `Process` handle meant `DLSym` would never be
called on Cygwin. Use the existing `&Invalid` sentinel instead of
`nullptr` for the `Process` handle.
2025-06-09 22:19:37 +03:00
Kazu Hirata
477f9f6d92
[llvm] Call hash_combine_range with ranges (NFC) (#143225)
We can now invoke hash_combine_range with a range.
2025-06-06 22:55:19 -07:00
Florian Mayer
44a6a44573
[NFC] [DebugCounter] warn if --debug-counter is unused in NDEBUG (#143057)
Co-authored-by: Nikita Popov <npopov@redhat.com>
2025-06-06 10:54:07 -07:00
Abhina Sreeskantharajan
6a4b89055b [SystemZ][z/OS] add back headers needed for strnlen, autoconversion 2025-06-06 09:45:06 -04:00
Christian Ulmann
052d5889f8
[Support] Properly zero initialize CPU set when querying affinity (#142924)
This commit resolves a potential issue of working with uninitialized
memory when querying the CPU's affinity. The man page of
`sched_getaffinity` does not guarantee that the memory will be fully
overwritten, so this change should ensure that issues are avoided.
2025-06-06 11:24:46 +02:00
Kazu Hirata
25642eaa1d [Support] Restore a couple of includes
A build failure has been reported at:

https://github.com/llvm/llvm-project/pull/142733#issuecomment-2942753737
2025-06-04 22:06:45 -07:00
Kazu Hirata
228f66807d
[llvm] Remove unused includes (NFC) (#142733)
These are identified by misc-include-cleaner.  I've filtered out those
that break builds.  Also, I'm staying away from llvm-config.h,
config.h, and Compiler.h, which likely cause platform- or
compiler-specific build failures.
2025-06-04 12:30:52 -07:00
Paul Kirth
8e77263ad0
[llvm][mustache] Fix UB in ASTNode::render() (#142249)
The current implementation set a reference to a nullptr, leading to all
kinds of problems. Instead, we can check the various uses to ensure we
don't deref invalid memory, and improve the logic for how contexts are
passed to children, since that was also subtly wrong in some cases.
2025-06-04 09:46:14 -07:00
Hemang Gadhavi
41841e625d
[lldb][llvm][AIX] Added support for getProcFile with TID (#142586)
This PR is in reference to porting LLDB on AIX.
Link to discussions on llvm discourse and github:

1. https://discourse.llvm.org/t/port-lldb-to-ibm-aix/80640
2. https://github.com/llvm/llvm-project/issues/101657
The complete changes for porting are present in this draft PR:
https://github.com/llvm/llvm-project/pull/102601

- Added changes to getProcFile() with threadID, including testcase for
AIX.
- Added support for AIX to get_threadid() from llvm.
2025-06-04 14:44:57 +05:30
Qinkun Bao
81bde1040c
[NFCI] Change SpecialCaseList::inSectionBlame to return pair<uint, uint> (FileIdx, LineNo). (#141540)
Accoring to the discussion in https://github.com/llvm/llvm-project/pull/140529, we need to SSCL can be created from multiple ignore list files, so we can repeat-fsanitize-ignorelist=. The change is necessary to achieve the feature described in https://github.com/llvm/llvm-project/issues/139128.
2025-05-28 00:18:37 -04:00
Qinkun Bao
1c3cff9856 [SpecialCaseList] Iterate sections and matchers in reverse order
Issue #139128 needs to find the last one in the file.

Pull Request: https://github.com/llvm/llvm-project/pull/141697
2025-05-27 18:47:09 -07:00
Kazu Hirata
448d0ec821
[Support] Use std::map::try_emplace (NFC) (#141374)
try_emplace can default-construct values, so we do not need to do so
on our own.
2025-05-24 14:47:56 -07:00
Qinkun Bao
e9dbf31be5
[NFCI][Sanitizer] Convert Matcher::Globs from StringMap to vector. (#140964)
As discussed in https://github.com/llvm/llvm-project/pull/139772 and
https://github.com/llvm/llvm-project/pull/140529, Matcher::Globs can
keep the order when parsing the case list.
2025-05-23 20:23:13 -04:00
Simon Pilgrim
23f0fbf8ff
[APInt] APInt::clearBitsSlowCase - fix cut+paste typo when merging lo/himasks (#141108)
Fixes #141098
2025-05-22 21:52:59 +01:00
jeremyd2019
7857543a63
[LLVM][Cygwin] add workaround for blocking connect/accept in AF_UNIX sockets (#140353)
On Cygwin, UNIX sockets involve a handshake between connect and accept
to enable SO_PEERCRED/getpeereid handling. This necessitates accept
being called before connect can return, but at least the tests in
llvm/unittests/Support/raw_socket_stream_test do both on the same thread
(first connect and then accept), resulting in a deadlock. Add a call to
both places sockets are created that turns off the handshake (and
SO_PEERCRED/getpeereid support).

References:
* cec8a6680e/winsup/cygwin/fhandler/socket_local.cc (L1462-L1471)
* https://inbox.sourceware.org/cygwin/Z_UERXFI1g-1v3p2@calimero.vinschen.de/T/#u
2025-05-22 08:15:21 +03:00
Rahul Joshi
a76bf4da53
[NFC][ADT/Support] Add {} for else when if body has {} (#140758) 2025-05-21 13:19:09 -07:00
Rahul Joshi
2cf6099cd5
[NFC][Support] Apply clang-format to regcomp.c (#140769)
Apply clang-format to regcomp.c since it's not conformant and leads to
clang-format failures when doing individual changes to this file (for
example in https://github.com/llvm/llvm-project/pull/140758). File
generated by running `clang-format -i regcomp.c`
2025-05-21 06:24:50 -07:00
Kazu Hirata
cbac2a9241
[llvm] Use llvm::is_contained (NFC) (#140742) 2025-05-20 14:34:16 -07:00
Abhina Sree
a9ee8e4a45
Create a EncodingConverter class with both iconv and icu support. (#138893)
This patch adds a wrapper class called EncodingConverter for
ConverterEBCDIC. This class is then extended to support the ICU library
or iconv library. The ICU library currently takes priority over the
iconv library.

Relevant RFCs:

https://discourse.llvm.org/t/rfc-adding-a-charset-converter-to-the-llvm-support-library/69795

https://discourse.llvm.org/t/rfc-enabling-fexec-charset-support-to-llvm-and-clang-reposting/71512

Stacked PR to enable fexec-charset that depends on this:
https://github.com/llvm/llvm-project/pull/138895

See old PR for review and commit history:
https://github.com/llvm/llvm-project/pull/74516
2025-05-20 14:02:22 -04:00
Andrew Rogers
dd0a1c56df
[llvm] revert preprocessor dump method guards from llvm::ScaledNumber (#140574)
## Purpose
Reverts the preprocessor guards added to the `dump()` methods in
`llvm/Support/ScaledNumber.h` in #139938 so that the header can be
included when building an external project in debug mode against a
release LLVM build.

## Overview
This is a clean revert of two files modified in #139938. The rest of
that change should not cause similar problems.

## Background
The following new build error was reported on #139938, which was merged
last week:
```
module.cpp:(.text._ZNK4llvm12ScaledNumberImE4dumpEv[_ZNK4llvm12ScaledNumberImE4dumpEv]+0x34): undefined reference to `llvm::ScaledNumberBase::dump(unsigned long, short, int)'
```
See further discussion on #139938.

## Validation
Implemented a simple external LLVM project to reproduce the issue.
Verified the the following link failure is observed on LLVM main
(Windows + Clang) without this change:
```
C:\WINDOWS\system32\cmd.exe /C "cd . && C:\PROGRA~1\LLVM\bin\CLANG_~1.EXE -nostartfiles -nostdlib -O0 -g -Xclang -gcodeview -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd -Xlinker /subsystem:console  -fuse-ld=lld-link CMakeFiles/llvm-dump-test.dir/main.cxx.obj -o llvm-dump-test.exe -Xlinker /MANIFEST:EMBED -Xlinker /implib:llvm-dump-test.lib -Xlinker /pdb:llvm-dump-test.pdb -Xlinker /version:0.0   -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -loldnames  && cd ."
lld-link: error: undefined symbol: public: static void __cdecl llvm::ScaledNumberBase::dump(unsigned __int64, short, int)
>>> referenced by S:\llvm\llvm-project\llvm\include\llvm\Support\ScaledNumber.h:614
>>>               CMakeFiles/llvm-dump-test.dir/main.cxx.obj:(public: void __cdecl llvm::ScaledNumber<unsigned __int64>::dump(void) const)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
```
Verified the link issue is resolved after applying this change.

Also, manually included all header files that were modified in #139938
in the test program and verified there are no other link errors.
2025-05-19 11:18:33 -07:00
Liam Semeria
d067014f13
[APInt] Added APInt::clearBits() method (#137098)
Added APInt::clearBits(unsigned loBit, unsigned hiBit) that clears bits within a certain range.

Fixes #136550

---------

Co-authored-by: Simon Pilgrim <llvm-dev@redking.me.uk>
2025-05-19 12:41:04 +01:00
Kazu Hirata
09d65fe8a1
[Support] Use std::optional::value_or (NFC) (#140436) 2025-05-18 07:34:20 -07:00
Kazu Hirata
bc6107a8d2
[Support] Use range-based for loops (NFC) (#140401) 2025-05-17 17:01:05 -07:00
Qinkun Bao
c6ad464347
[NFC] Run code formatter on Diagnostic.h/cpp ProfileList.cpp SpecialCaseList.cpp
Reviewers: vitalybuka

Reviewed By: vitalybuka

Pull Request: https://github.com/llvm/llvm-project/pull/140316
2025-05-17 17:11:49 -04:00
Dmitry Vasilyev
4a4f0ffb5b
Fixed cmake config in case of LLVM_ENABLE_RPMALLOC=ON and non MSVC compiler (#139770)
This patch fixes the following error in case of LLVM_ENABLE_RPMALLOC=ON
and clang or other non MSVC compiler:
```
CMake Error at cmake/modules/AddLLVM.cmake:644 (add_library):
  Target "LLVMSupport" links to item " -INCLUDE:malloc" which has leading or
  trailing whitespace.  This is now an error according to policy CMP0004.
Call Stack (most recent call first):
  cmake/modules/AddLLVM.cmake:944 (llvm_add_library)
  cmake/modules/AddLLVM.cmake:917 (add_llvm_library)
  lib/Support/CMakeLists.txt:139 (add_llvm_component_library)
```
Note `delayload_flags` is empty before this line is case of non MSVC
compiler.
The behavior is the same with CMake 3.25.3 and 4.0.2.
2025-05-17 00:41:25 +04:00
Qinkun Bao
dd4a73069c
[NFCI][Sanitizer] Convert SpecialCaseList::Sections from StringMap to vector.
As discussed in https://github.com/llvm/llvm-project/pull/139772, SpecialCaseList::Sections can keep the order of Sections when parsing the case list.

Reviewers: thurstond, vitalybuka

Reviewed By: vitalybuka

Pull Request: https://github.com/llvm/llvm-project/pull/140127
2025-05-16 15:32:54 -04:00
Douglas
8eafd93034
[Support] Set OF_Delete for InMemoryBuffer's call to openFileForWrite under commit (#140109)
https://github.com/llvm/llvm-project/pull/134787 unintentionally enabled
`--mmap-output-file` by default under LLD which caused the Windows-only
test `lld\test\ELF\link-open-file.test` to fail. This failure uncovered
what appears to be an inconsistency on Windows between
`createOnDiskBuffer` and `createInMemoryBuffer` with respect to `DELETE`
access for the output file.

The output file created by `createOnDiskBuffer` sets the flag
`OF_Delete` as part of `fs::TempFile::create` while the output file
created by `createInMemoryBuffer` sets `OF_None` under
`InMemoryBuffer::commit`.

The test `lld\test\ELF\link-open-file.test` ensures that if
`FILE_SHARE_DELETE` is _not_ specified for an output file that LLD is
expected to overwrite, LLD should fail. This only happens if: "the file
or device has been opened for delete access" which is only done for
`fs::TempFile::create`.

See
https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew#FILE_SHARE_DELETE.

Therefore, I propose setting `OF_Delete` for `InMemoryBuffer::commit`'s
call to `openFileForWrite` to stay consistent with
`fs::TempFile::create`.
2025-05-16 06:40:45 -07:00
cor3ntin
381a649fb9
[Clang] Add warnings when mixing different charN_t types (#138708)
charN_t represent code units of different UTF encodings. Therefore the
values of 2 different charN_t objects do not represent the same
characters.

In order to avoid comparing apples and oranges, we add new warnings to
warn on:
  - Implicit conversions
  - Comparisons
  - Other cases involving arithmetic conversions

We only produce the warning if we cannot establish the comparison would
be safe through constant evaluation.

The new `-Wimplicit-unicode-conversion` warning is enabled by default.

Note that this PR intentionally doesn;t touches char/wchar_t, but it
would be worth considering also warning on extending the new warnings to
these types (in a follow up)

Additionally most arithmetic operations on charN_t don't really make
sense (ie what does it mean to addition code units), so we could add
warnings for that.

Fixes #138526
2025-05-15 18:16:05 +02:00
Fangrui Song
369c409348
Support,lld: Rename misnamed F_no_mmap to F_mmap
`F_no_mmap` introduced by https://reviews.llvm.org/D69294 is misnamed.
It oughts to be `F_mmap`

When the output is a regular file or do not exist,
`--no-mmap-output-file` is the default. Relands #134787 by fixing the
lld option default. Note: changing the default to --map-output-file
would likely fail on llvm-clang-x86_64-sie-win
(https://lab.llvm.org/buildbot/#/builders/46/builds/14847)

Pull Request: https://github.com/llvm/llvm-project/pull/139836
2025-05-14 21:00:49 -07:00
Andrew Rogers
0563186a76
[llvm] properly guard dump methods in Support lib classes (#139938)
## Purpose
Add proper preprocessor guards for all `dump()` methods in the LLVM
support library. This change ensures these methods are not part of the
public ABI for release builds.

## Overview
* Annotates all `dump` methods in Support and ADT source with the
`LLVM_DUMP_METHOD` macro.
* Conditionally includes all `dump` method definitions in Support and
ADT source so they are only present on debug/assert builds and when
`LLVM_ENABLE_DUMP` is explicitly defined.

NOTE: For many of these `dump` methods, the implementation was already
properly guarded but the declaration in the header file was not.

## Background
This PR is a redo of #139804 with some changes to fix clang and unit
test build breaks.

This issue was raised in comments on #136629. I am addressing it as a
separate change since it is independent from the changes being made in
that PR.

According to [this
documentation](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Support/Compiler.h#L637),
`dump` methods should be annotated with `LLVM_DUMP_METHOD` and
conditionally included as follows:
```
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
  LLVM_DUMP_METHOD void dump() const;
#endif
```

## Validation
* Local release build succeeds.
* CI
2025-05-14 13:48:45 -07:00
Andrew Rogers
9a0e1c7988
Revert "[llvm] properly guard dump methods in Support lib classes" (#139927)
Reverts llvm/llvm-project#139804
2025-05-14 09:35:19 -07:00
Andrew Rogers
c9d05f3bcb
[llvm] properly guard dump methods in Support lib classes (#139804)
## Purpose
Add proper preprocessor guards for all `dump()` methods in the LLVM
support library. This change ensures these methods are not part of the
public ABI for release builds.

## Overview
* Annotates all `dump` methods in Support and ADT source with the
`LLVM_DUMP_METHOD` macro.
* Conditionally includes all `dump` method definitions in Support and
ADT source so they are only present on debug/assert builds and when
`LLVM_ENABLE_DUMP` is explicitly defined.

NOTE: For many of these `dump` methods, the implementation was already
properly guarded but the declaration in the header file was not.

## Background
This issue was raised in comments on #136629. I am addressing it as a
separate change since it is independent from the changes being made in
that PR.

According to [this
documentation](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Support/Compiler.h#L637),
`dump` methods should be annotated with `LLVM_DUMP_METHOD` and
conditionally included as follows:
```
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
  LLVM_DUMP_METHOD void dump() const;
#endif
```

## Validation
* Local release build succeeds.
* CI
2025-05-14 08:54:12 -07:00
Rahul Joshi
86c5112409
[NFCI][LLVM/MLIR] Adopt TrailingObjects convenience API (#138554)
Adopt `TrailingObjects` convenience API that was added in
https://github.com/llvm/llvm-project/pull/138970 in LLVM and MLIR code.
2025-05-12 16:17:43 -07:00
Andrew Rogers
9c5f451d1c
[llvm] annotate interfaces in llvm/Support for DLL export (#136014)
## Purpose

This patch is one in a series of code-mods that annotate LLVM’s public
interface for export. This patch annotates the `llvm/Support` library.
These annotations currently have no meaningful impact on the LLVM build;
however, they are a prerequisite to support an LLVM Windows DLL (shared
library) build.

## Background

This effort is tracked in #109483. Additional context is provided in
[this
discourse](https://discourse.llvm.org/t/psa-annotating-llvm-public-interface/85307),
and documentation for `LLVM_ABI` and related annotations is found in the
LLVM repo
[here](https://github.com/llvm/llvm-project/blob/main/llvm/docs/InterfaceExportAnnotations.rst).

The bulk of these changes were generated automatically using the
[Interface Definition Scanner (IDS)](https://github.com/compnerd/ids)
tool, followed formatting with `git clang-format`.

The following manual adjustments were also applied after running IDS on
Linux:
- Add `#include "llvm/Support/Compiler.h"` to files where it was not
auto-added by IDS due to no pre-existing block of include statements.
- Add `LLVM_ABI` to Windows-only code (auto generated with IDS on
Windows)
- Explicitly make classes non-copyable where needed to due IDS adding
`LLVM_ABI` at the class level
- Add `LLVM_TEMPLATE_ABI` and `LLVM_EXPORT_TEMPLATE` to exported
instantiated templates
- Add `LLVM_ABI_FRIEND` to a small number of `friend` function
declarations
- Add `LLVM_ABI` to a subset of private class methods and fields that
require export
- Add `LLVM_ABI` to a small number of symbols that require export but
are not declared in headers
- Add `LLVM_ABI` functions defined via X-macro

## Validation

Local builds and tests to validate cross-platform compatibility. This
included llvm, clang, and lldb on the following configurations:

- Windows with MSVC
- Windows with Clang
- Linux with GCC
- Linux with Clang
- Darwin with Clang
2025-05-12 12:13:52 -07:00
Kazu Hirata
18549aa1cc
[llvm] Use StringRef::drop_back (NFC) (#139471) 2025-05-11 15:37:41 -07:00
Kazu Hirata
7470131b43
[llvm] Use StringRef::consume_front (NFC) (#139458) 2025-05-11 10:28:49 -07:00
Cyndy Ishida
12e6622d4a
[Support] Avoid setting minor/subminor/build in VersionTuple::withMajorReplaced (#139318)
The expectation of this API is that it only changes the major version of
a preexisting version tuple. However, it was adding 0's, which caused
unintended changes in serialization or printing.

Instead, check for the existence of the non-major parts of the tuple.
2025-05-09 16:56:18 -07:00
no92
7c7ea1e0eb
[llvm] Add managarm support (#138854)
This PR is part of a series to upstream managarm support, as laid out in
the
[RFC](https://discourse.llvm.org/t/rfc-new-proposed-managarm-support-for-llvm-and-clang-87845/85884/1).
This PR is a follow-up to #87845.

The intention here is to add the managarm target to the LLVM support
lib, in preparation for a follow-up that would add the missing clang
driver bits.
2025-05-08 22:37:17 -04:00
Rahul Joshi
7245e21e89
[NFC][Support] Add llvm::uninitialized_copy (#138174)
Add `llvm::uninitialized_copy` that accepts a range instead of start/end
iterator for the source of the copy.
2025-05-07 17:37:38 -07:00