Commit graph

431497 commits

Author SHA1 Message Date
Alex Bradbury 4ba6a9c9f6 [RISCV][ReleaseNotes] Added LLVM and Clang release notes for RISC-V 15.0.0 2022-09-05 10:48:03 +01:00
Tobias Hieta 28f4245b67 [DOCS] Minor fixes and removals of WIP warnings 2022-09-04 16:48:01 +02:00
Philip Reames be1669163f [RLEV] Pick a correct insert point when incoming instruction is itself a phi node
This fixes https://github.com/llvm/llvm-project/issues/57336. It was exposed by a recent SCEV change, but appears to have been a long standing issue.

Note that the whole insert into the loop instead of a split exit edge is slightly contrived to begin with; it's there solely because IndVarSimplify preserves the CFG.

Differential Revision: https://reviews.llvm.org/D132571

(cherry picked from commit c37b1a5f764380f83ba08ae0cebca2b162123eb6)
2022-09-04 16:10:37 +02:00
Nico Weber 11ba13a625 [clang] Add __is_target_variant_{os,environment} builtins
Xcode 13's clang has them. For the included testcase, Xcode's clang
behaves like the implementation in this patch.

Availability.h in the macOS 12.0 SDK (part of Xcode 13, and the current
stable version of the macOS SDK) does something like:

   #if defined(__has_builtin)
     ...
     #if __has_builtin(__is_target_os)
      #if __has_builtin(__is_target_environment)
       #if __has_builtin(__is_target_variant_os)
        #if __has_builtin(__is_target_variant_environment)
         #if (... && ((__is_target_os(ios) && __is_target_environment(macabi)) || (__is_target_variant_os(ios) && __is_target_variant_environment(macabi))))
           #define __OSX_AVAILABLE_STARTING(_osx, _ios) ...
           #define __OSX_AVAILABLE_BUT_DEPRECATED(_osxIntro, _osxDep, _iosIntro, _iosDep) ...
           #define __OSX_AVAILABLE_BUT_DEPRECATED_MSG(_osxIntro, _osxDep, _iosIntro, _iosDep, _msg) ...

So if __has_builtin(__is_target_variant_os) or
__has_builtin(__is_target_variant_environment) are false, these defines are not
defined.

Most of the time, this doesn't matter. But open-source clang currently fails
to commpile a file containing only `#include <Security/cssmtype.h>` when
building for catalyst by adding a `-target arm64-apple-ios13.1-macabi` triple,
due to those __OSX_AVAILABLE macros not being set correctly.

If a potential future SDK version were to include cssmtype.h transitively
from a common header such as `<Foundation/Foundation.h>`, then it would become
close to impossible to build Catalyst binaries with open-source clang.

To fix this for normal catalyst builds, it's only necessary that
__has_builtin() evaluates to true for these two built-ins -- the implementation
of them doesn't matter. But as a courtesy, a correct (at least on the test
cases I tried) implementation is provided. (This should also help people who
try to build zippered code, where having the correct implementation does
matter.)

Differential Revision: https://reviews.llvm.org/D132754
2022-09-02 08:06:26 +02:00
Muiez Ahmed 80b4a25d7a [SystemZ][z/OS] Account for renamed parameter name (libc++)
The following patch (https://reviews.llvm.org/D129051) broke z/OS builds by renaming the parameter name. This patch accounts for that change.

Differential Revision: https://reviews.llvm.org/D132946

(cherry picked from commit e1e9961f7692cfb84c4b3bb213d515d4c80332a4)
2022-09-01 13:19:27 +02:00
Anastasia Stulova 5e1b36ced5 [Docs][OpenCL][SPIR-V] Release 15 notes for Clang. 2022-09-01 10:07:00 +01:00
Roy Jacobson 0b644cb1cc [Frontend] Restore Preprocessor::getPredefines()
https://reviews.llvm.org/rG6bbf51f3ed59ae37f0fec729f25af002111c9e74 from May removed Preprocessor::getPredefines() from Clang's API, presumably as a cleanup because this method is unused in the LLVM codebase.

However, it was/is used by a small number of third-party tools and is pretty harmless, so this patch adds it back and documents why it's here.

The issue was raised in https://github.com/llvm/llvm-project/issues/57483, it would be nice to be able to land it into Clang 15 as it breaks those third-party tools and we can't easily add it back in bug fix releases.

Reviewed By: brad.king, thieta

Differential Revision: https://reviews.llvm.org/D133044

(cherry picked from commit bb9dedce5d01f5608acd784942481f386c710c0d)
2022-09-01 11:00:15 +02:00
Chuanqi Xu 98b6628d16 [docs] Add "Standard C++ Modules"
We get some standard C++ module things done in clang15.x. But we lack a
user documentation for it. The implementation of standard C++ modules
share a big part of codes with clang modules. But they have very
different semantics and user interfaces, so I think it is necessary to
add a document for Standard C++ modules. Previously, there were also
some people ask the document for standard C++ Modules and I couldn't
offer that time.

Reviewed By: iains, Mordante, h-vetinari, ruoso, dblaikie, JohelEGP,
aaronmondal

Differential Revision: https://reviews.llvm.org/D131388

(cherry picked from commit b1d5af81249dc7e5697faf9ee33f86012ccd8668)
2022-09-01 11:00:07 +02:00
Alexey Bataev 4d2256aa7f [SLP]Fix PR57447: Assertion `!getTreeEntry(V) && "Scalar already in tree!"' failed.
The pointer operands for the ScatterVectorize node may contain
non-instruction values and they are not checked for "already being
vectorized". Need to check that such pointers are already vectorized and
gather them instead of trying to build vectorize node to avoid compiler
crash.

Differential Revision: https://reviews.llvm.org/D132949

(cherry picked from commit ec06df9459136ed538c07d32db16163999c350fe)
2022-09-01 10:59:56 +02:00
Dan McGregor 761d71a489 [MCContext] Reverse order of DebugPrefixMap sort for generated assembly debug info
Match Clang's sorting, so that longer (more specific) prefix paths will match
before less specific paths.

Reviewed By: MaskRay, raj.khem, #debug-info

Differential Revision: https://reviews.llvm.org/D132390

(cherry picked from commit 3922ec46b84a877a9ac6ce4cfa765c4c847d097d)
2022-08-30 08:56:25 +02:00
Florian Hahn 9070c258c1 [LAA] Require AddRecs to be in the innermost loop for diff-checks.
The simpler diff-checks require pointers with add-recs from the same
innermost loop, but this property wasn't check completely. Add the
missing check to ensure both addrecs are in the innermost loop.

Fixes #57315.

(cherry picked from commit 9405af1c850139f6ddd6d35ff395756fe2aef31f)
2022-08-30 08:08:28 +02:00
Florian Hahn 3367244b7e [LV] Add another test for incorrect runtime check generation.
Add a variation of @nested_loop_outer_iv_addrec_invariant_in_inner with
the dependence sink and source swapped to extend test coverage.

Also simplifies the test by removing an unneeded reduction.

(cherry picked from commit e117137af0a37ac309d40db57ec7162ef3d22c29)
2022-08-30 08:08:28 +02:00
Florian Hahn afde142bfe [LV] Add test for incorrect runtime check generation #57315.
Test for PR57315 based on a test provided by @kpdev42.

(cherry picked from commit 6e56779e6bc168a3acd14f9bf2c4fd3fd9d86bd1)
2022-08-30 08:08:28 +02:00
Florian Hahn 4bb006d0d3 [LV] Convert runtime diff check test to use opaque pointers.
Modernize the test to make it easier to extend with up-to-date IR.

(cherry picked from commit 3b135ef446d56e8542d55a1b716e9413f50da7aa)
2022-08-30 08:08:28 +02:00
Aaron Puchert 0c5ce1d7fb Fix formatting in release notes
Code needs double backticks, while single backticks produce italics.
Lists need to be fully indented and have blank lines around them.
Links are written "`text <url>`_".

We use links instead of `:manpage:`, because the latter is meant
more for man pages cross-referencing each other.

Reviewed By: aaron.ballman, thieta

Differential Revision: https://reviews.llvm.org/D132791
2022-08-29 19:43:34 +02:00
Shoaib Meenai 05d07e41b3 [lld] Fix typo in 15.x release notes
The flag is -femit-dwarf-unwind, not -femit-compact-unwind.
2022-08-29 16:33:53 +05:00
Amy Kwan 68e77f1595 [ReleaseNotes]: Add PowerPC release notes for LLVM 15 2022-08-28 13:56:39 -05:00
Tobias Hieta 1594ec2a71 [workflow] Run release tasks for me (tru) as well.
Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D131493
2022-08-25 21:17:32 +02:00
Tobias Hieta d3ba48998f [release] Use threaded compression with xz
Use xz -T0 to use your threads

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D131470
2022-08-25 21:17:11 +02:00
Phoebe Wang 3d3ef9d073 [X86][FP16] Add the missing legal action for EXTRACT_SUBVECTOR
Fixes #57340

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D132563

(cherry picked from commit 12b203ea7c65071f9fc02d420b28d58dcdc5ad4a)
2022-08-25 12:49:26 +02:00
Martin Storsjö 9c29291dfa [LLD] [COFF] Fix export directives in object files from -includeoptional
When an object file contains an export directive, we normally do some
amount of deferred processing of them at the end of the linking
process. The -includeoptional option was handled after this, and
any object files (defining new exports) weren't handled.

Move the handling of the -includeoptional into the same late loop
which does the fixups for e.g. export directives.

Ideally, this would also be done for object files that are pulled
in by the wrap options, and for mingw autoimports, but those changes
require more modifications, to make them safe for potentially
being executed multiple times.

This fixes https://github.com/llvm/llvm-project/issues/57243.

Differential Revision: https://reviews.llvm.org/D132361

(cherry picked from commit af39e6f6fc905f3c067f022fb44136779d2f9c84)
2022-08-25 12:49:09 +02:00
Tobias Hieta e6f03d1476 [NFC] Fix a misleading comment CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION 2022-08-25 09:57:30 +02:00
H. Vetinari 5768325f06 SONAME introduce option CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION
This reverts commit bc39d7bdd4.

rename CLANG_SONAME to LIBCLANG_SOVERSION

[clang][cmake] introduce option CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION

Differential Revision: https://reviews.llvm.org/D132486
2022-08-25 09:39:40 +02:00
Simon Pilgrim fe3ff3806f [DAG] MatchRotate - bail if we fail to match a shl/srl pair
extractShiftForRotate may fail to return canonicalized shifts due to constant folding or other simplification that can occur in getNode()

Fixes Issue #57283

(cherry picked from commit e624f8a3bb88075493dec521408993ea0ef7bde0)
2022-08-25 09:07:51 +02:00
Petr Hosek 3a481d4491 [runtimes] Use a response file for runtimes test suites
We don't know which test suites are going to be included by runtimes
builds so we cannot include those before running the sub-build, but
that's not possible during the LLVM build configuration. We instead use
a response file that's populated by the runtimes build as a level of
indirection.

This addresses the issue described in:
https://discourse.llvm.org/t/cmake-regeneration-is-broken/62788

Differential Revision: https://reviews.llvm.org/D132438

(cherry picked from commit 992e10a3fce41255e4b11782f51d0f4b26dca14d)
2022-08-25 09:04:03 +02:00
Petr Hosek 427e1ea3e7 [lit] Support reading arguments from a file
This allows reading arguments from file using the response file syntax.
We would like to use this in the LLVM build to pass test suites from
subbuilds.

Differential Revision: https://reviews.llvm.org/D132437

(cherry picked from commit b52820edec6f3d95edef7859a56ef30878b08382)
2022-08-25 09:04:03 +02:00
Louis Dionne 0cc033e333 [runtimes] Handle interface targets in runtimes distribution components
As reported in [1], cxx-headers is not a valid distribution target
because it is an interface target in CMake. This breaks the most
basic MultiDistributionExample of the runtimes build.

This patch handles interface targets by getting rid of the assumption
that all distribution components have a target associated to them. It
is valid for a distribution component to only have a `install-FOO`
target.

In the case where only `cxx-headers` is provided as a distribution
component, `ninja toolchain-distribution` will not build anything
after this patch, since there is effectively nothing to build for
the `cxx-headers` target. However, running `ninja install-toolchain-distribution`
will build everything, as expected.

[1]: https://discord.com/channels/636084430946959380/636732894974312448/1010013287464828968

Differential Revision: https://reviews.llvm.org/D132387

(cherry picked from commit 5905e699342fd476d7eb9e35db5d84248a7e9156)
2022-08-25 09:03:53 +02:00
Louis Dionne d761fe6ef1 [libc++] Add a missing assertion in std::span's constructor
Also, add missing tests for assertions in span constructors. Now I
believe that all of std::span's API should be hardened, and all the
assertions should have a corresponding test.

Differential Revision: https://reviews.llvm.org/D131681

(cherry picked from commit 8c6319e30a357fb9b25db09b6f5fc9cf3e7c4aab)
2022-08-25 09:03:53 +02:00
Tobias Hieta 12f27d8bef Revert "GCC ABI Compatibility: Preserve alignment of non-pod members in packed structs"
This reverts commit 277123376c.

See issue: https://github.com/llvm/llvm-project/issues/57346
2022-08-25 09:00:25 +02:00
Nemanja Ivanovic 4e4252f9b6 [GTest] Change detection of libpthread
We currently use CMake's find_library function to detect whether
libpthread exists on the system to determine if pthread should
be added on the link step. However, there are configurations in
which CMake's path checking fails to find the library even though
the toolchain has it.

One such case is with Clang 14.0.0 on PowerPC. Due to a recent
change, the build puts libc++ and related libraries in a
subdirectory that appears to depend on the default target triple.
CMake then uses that subdirectory to determine the architecture
and adds that name to its search paths. However, the triple for
the system GNU toolchain is different so CMake fails to find it.
Namely, Clang 14.0.0's default target triple and the subdirectory
name is powerpc64le-unknown-linux-gnu whereas the system GNU
toolchain has powerpc64le-linux-gnu. Clang's driver has no trouble
finding either the GNU includes/libraries or Clang's own. But
CMake seems to get this wrong.

The net result of this is that we can't do a shared libraries
build of ToT with Clang 14.0.0.

This patch proposes using HAVE_LIBPTHREAD which CMake seems to
determine by compiling a test file with -lpthread (or perhaps
-pthread, I can't really get CMake to tell me how it is figuring
this out). If that variable tells CMake that the build compiler
accepts the pthread option, it seems reasonable to depend on
that variable to determine if we should add it to the link step
when building the llvm_gtest library.

(cherry picked from commit 8537a99b2c1d08e9e586b3fb9e36728075ec4a03)
2022-08-23 19:10:12 +02:00
Joseph Huber bcb8d21fc3 [CUDA] Fix output name being replaced in device-only mode
When performing device only compilation, there was an issue where
`cubin` outputs were being renamed to `cubin` despite the user's name.
This is required in a normal compilation flow as the Nvidia tools only
understand specific filenames instead of checking magic bytes for some
unknown reason. We do not want to perform this transformation when the
user is performing device only compilation.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D131278

(cherry picked from commit 3b52341116b794e53dec2fd07e568884e5a0b8bb)
2022-08-23 19:10:03 +02:00
Kadir Cetinkaya 99b6254657 [clangd] Support for standard type hierarchy
This is mostly a mechanical change to adapt standard type hierarchy
support proposed in LSP 3.17 on top of clangd's existing extension support.

This does mainly two things:
- Incorporate symbolids for all the parents inside resolution parameters, so
  that they can be retrieved from index later on. This is a new code path, as
  extension always resolved them eagerly.
- Propogate parent information when resolving children, so that at least one
  branch of parents is always preserved. This is to address a shortcoming in the
  extension.

This doesn't drop support for the extension, but it's deprecated from now on and
will be deleted in upcoming releases. Currently we use the same struct
internally but don't serialize extra fields.

Fixes https://github.com/clangd/clangd/issues/826.

Differential Revision: https://reviews.llvm.org/D131385

(cherry picked from commit 83411bf06f34ae06731008eeabfc53553c1a1f86)
2022-08-23 19:09:56 +02:00
Alexander Shaposhnikov 077736456f [InstCombine] Refactor foldICmpMulConstant
This is a follow-up to 2ebfda2417
(replace "if" with "else if" since the cases nuw/nsw
were meant to be handled separately).

Test plan:
1/ ninja check-llvm check-clang check-lld
2/ Bootstrapped LLVM/Clang pass tests

(cherry picked from commit d982f1e0c69f3447c4520ae4c010520f62ed1174)
2022-08-23 19:09:48 +02:00
Jonas Hahnfeld 69c35fa29a [RISCV] Re-enable JIT support
Commit 8922adf646 recently made JITTargetMachineBuilder honor the
hasJIT property of the target. LLVM supports just-in-time compilation
on RISC-V, so set the flag.

Differential Revision: https://reviews.llvm.org/D131617

(cherry picked from commit 940733d6a0a92245912361bf116514172a15f4f8)
2022-08-23 19:09:38 +02:00
Tobias Hieta b11009ffe7
[NFC] Minor documentation fix for the release branch 2022-08-22 16:32:55 +02:00
David Truby 006b649321 [clang][docs] Release notes for C/C++ SVE Operators 2022-08-22 13:53:56 +01:00
Rainer Orth b6889f0f1b [Sparc] Don't use SunStyleELFSectionSwitchSyntax
As discussed in D85414 <https://reviews.llvm.org/D85414>, two tests
currently `FAIL` on Sparc since that backend uses the Sun assembler syntax
for the `.section` directive, controlled by
`SunStyleELFSectionSwitchSyntax`.

Instead of adapting the affected tests, this patch changes that default.
The internal assembler still accepts both forms as input, only the output
syntax is affected.

Current support for the Sun syntax is cursory at best: the built-in
assembler cannot even assemble some of the directives emitted by GCC, and
the set supported by the Solaris assembler is even larger: SPARC Assembly
Language Reference Manual, 3.4 Pseudo-Op Attributes
<https://docs.oracle.com/cd/E37838_01/html/E61063/gmabi.html#scrolltoc>.

A few Sparc test cases need to be adjusted. At the same time, the patch
fixes the failures from D85414 <https://reviews.llvm.org/D85414>.

Tested on `sparcv9-sun-solaris2.11`.

Differential Revision: https://reviews.llvm.org/D85415

(cherry picked from commit d9993484ee40abaab6d9e96872d3a29044202aea)
2022-08-22 11:35:56 +02:00
Martin Sebor 87c92cd2fc [InstCombine] Correct strtol folding with nonnull endptr
Reflect in the pointer's offset the length of the leading part
of the consumed string preceding the first converted digit.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D130912

(cherry picked from commit bcef4d238d113c61127575bf5dd0328f97bda9e9)
2022-08-22 11:35:48 +02:00
Rainer Orth b630bafb3c [mlir][test] Require JIT support in JIT tests
A number of mlir tests `FAIL` on Solaris/sparcv9 with `Target has no JIT
support`.  This patch fixes that by mimicing `clang/test/lit.cfg.py` which
implements a `host-supports-jit` keyword for this.  The gtest-based unit
tests don't support `REQUIRES:`, so lack of support needs to be hardcoded
there.

Tested on `amd64-pc-solaris2.11` (`check-mlir` results unchanged) and
`sparcv9-sun-solaris2.11` (only one unrelated failure left).

Differential Revision: https://reviews.llvm.org/D131151

(cherry picked from commit ca98e0dd6cf59907f07201c4282dcafeeea11a91)
2022-08-22 11:35:40 +02:00
Alex Bradbury 43fb0d7193 [clang][RISCV] Fix incorrect ABI lowering for inherited structs under hard-float ABIs
The hard float ABIs have a rule that if a flattened struct contains
either a single fp value, or an int+fp, or fp+fp then it may be passed
in a pair of registers (if sufficient GPRs+FPRs are available).
detectFPCCEligibleStruct and the helper it calls,
detectFPCCEligibleStructHelper examine the type of the argument/return
value to determine if it complies with the requirements for this ABI
rule.

As reported in bug #57084, this logic produces incorrect results for C++
structs that inherit from other structs. This is because only the fields
of the struct were examined, but enumerating RD->fields misses any
fields in inherited C++ structs. This patch corrects that issue by
adding appropriate logic to enumerate any included base structs.

Differential Revision: https://reviews.llvm.org/D131677

(cherry picked from commit bc538320809fb52af12ec0366118c82201af4f40)
2022-08-22 11:35:31 +02:00
Alex Bradbury 89be541e31 [clang][RISCV][test] Add test that shows incorrect ABI lowering
As reported in <https://github.com/llvm/llvm-project/issues/57084>,
under hard float ABIs there are issues with lowering structs that
inherit from other structs.

See <https://reviews.llvm.org/D131677> for a fix.

(cherry picked from commit d17de5479c6234f9e37fb4deca9e537bf8d3932e)
2022-08-22 11:35:31 +02:00
Sanjay Patel 2950a43867 [SDAG] avoid generating libcall to function with same name
This is a potentially better alternative to D131452 that also
should avoid the infinite loop bug from:
issue #56403

This is again a minimal fix to reduce merging pain for the
release. But if this makes sense, then we might want to guard
all of the RTLIB generation (and other libcalls?) with a
similar name check.

Differential Revision: https://reviews.llvm.org/D131521

(cherry picked from commit 7f72a0f5bb3743428021df920d9a7c50f74f61ae)
2022-08-22 11:35:21 +02:00
Sanjay Patel e2613c5ea6 [AArch64] add test for recursive libcall lowering; NFC
Issue #56403

(cherry picked from commit 8eddd1ec6066fe958313a2b1cc4907b5ee7dfbee)
2022-08-22 11:35:21 +02:00
Tom Stellard 05c85020a5 workflows/llvm-project-tests: Workaround an issue with lldb builds on Windows
For some reason cmake started selecting a 32-bit version of python on
Windows instead of the 64-bit version when building windows.  Explicitly
setting the default python to 3.10 fixes this problem.

Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D132280

(cherry picked from commit 99020b3c73c1e22fa388be8fd0c44391d40b3a38)
2022-08-20 00:15:54 -07:00
Tom Stellard 0bc3cbb984 workflows/version-check: Fix check for release candidates
Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D131650

(cherry picked from commit 5b108dfc159a461c10bba1fd1f05308bf57dcd25)
2022-08-19 22:12:59 -07:00
Haojian Wu 0334c1ac1b [clangd] Fix an inlay-hint crash on a broken designator.
Differential Revision: https://reviews.llvm.org/D131696

(cherry picked from commit 06b97b4985ad0415f6cde4baad2bc7d73b456244)
2022-08-18 08:29:04 +02:00
Rainer Orth 67ea7a1b11 [flang] Add Solaris/x86 support to Optimizer/CodeGen/Target.cpp
When testing LLVM 15.0.0 rc1 on Solaris, I found that 50+ flang tests
`FAIL`ed with

  error:
/vol/llvm/src/llvm-project/local/flang/lib/Optimizer/CodeGen/Target.cpp:310:
not yet implemented: target not implemented

This patch fixes that for Solaris/x86, where the fix is trivial (just
handling it like the other x86 OSes).

Tested on `amd64-pc-solaris2.11`; only a single failure remains now.

Differential Revision: https://reviews.llvm.org/D131054

(cherry picked from commit bcb2740f415b0f825402f656dda3271414121a0e)
2022-08-18 08:28:57 +02:00
Fangrui Song af3707c3b8 [MC] Avoid C++17 structured bindings
release/15.x uses C++14 and structured bindings trigger warnings in Clang/GCC
and errors in MSVC.
2022-08-17 10:38:38 -07:00
Michał Górny 64260feaa7 [llvm] [cmake] Move LLVM_INSTALL_PACKAGE_DIR top-level to fix llvm-config
Move the `LLVM_INSTALL_PACKAGE_DIR` declaration from llvm/cmake/modules
directory to the top-level llvm/CMakeLists.txt, in order to fix
the regression in `llvm-config --cmakedir` output for installed LLVM.
Since the tools directory is processed by CMake prior to
llvm/cmake/modules, the llvm-config executable ended up using
the variable prior to it being defined and incorrectly used an empty
path, resulting in e.g.:

    $ llvm-config --cmakedir
    /usr/lib/llvm/16/

With this patch, the path is defined (and therefore the default value
is being set) prior to adding the tools subdirectory and llvm-config
starts working correctly:

    $ llvm-config --cmakedir
    /usr/lib/llvm/16/lib64/cmake/llvm

This fixes a regression introduced by D130539.  Thanks to Petr Polezhaev
for reporting the problem @ https://bugs.gentoo.org/865165

Differential Revision: https://reviews.llvm.org/D131878

(cherry picked from commit d230055234863aafe63489f9ab95e52d2c1883f2)
2022-08-17 10:56:24 +02:00
Maciej Gabka b4a285bcb5 [clang][SVE] Undefine preprocessor macro defined in
arm_sve.h defines and uses __ai macro which needs to be undefined (as it is
already in arm_neon.h).

Reviewed By: paulwalker-arm

Differential Revision: https://reviews.llvm.org/D131580

(cherry picked from commit 48e1250a91d244741c8677fed248ace1fcd7c41c)
2022-08-17 10:56:17 +02:00