Age | Commit message (Collapse) | Author | Files | Lines |
|
dependent contexts.
We previously assumed they were neither value- nor
instantiation-dependent under any circumstances, which would lead to
crashes and other misbehavior.
(cherry picked from commit bdad0a1b79273733df9acc1be4e992fa5d70ec56)
|
|
Summary:
The define out of line refactor tool previously would copy the `virtual`, `override` and `final` specifier into the out of line method definition.
This results in malformed code as those specifiers aren't allowed outside the class definition.
Reviewers: hokein, kadircet
Reviewed By: kadircet
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang, #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D75429
(cherry picked from commit b2666ccca0277371a09e43a0a5a0f78029ba81e5)
|
|
|
|
This reverts commit 94d4ca90040a5f55ee29f48043881437de56681e.
I reverted 68a235d07f9e70 again in
916be8fd6a0a0feea4cefcbeb0c22c65848d7a2e.
(cherry picked from commit 93c73d4834a96ac749dabb624e07f9a146186875)
|
|
and follow-ups:
a2ca1c2d "build: disable zlib by default on Windows"
2181bf40 "[CMake] Link against ZLIB::ZLIB"
1079c68a "Attempt to fix ZLIB CMake logic on Windows"
This changed the output of llvm-config --system-libs, and more
importantly it broke stand-alone builds. Instead of piling on more fix
attempts, let's revert this to reduce the risk of more breakages.
(cherry picked from commit 916be8fd6a0a0feea4cefcbeb0c22c65848d7a2e)
|
|
Summary: As per rsmith (https://reviews.llvm.org/D75383).
Reviewers: hans
Reviewed By: hans
Subscribers: cfe-commits, rsmith
Tags: #clang
Differential Revision: https://reviews.llvm.org/D75469
|
|
|
|
getFirstInsertionPt's return value must be checked for validity before
casting it to Instruction*. Don't attempt to insert casts after a phi in
a catchswitch block.
Fixes PR45033, introduced in D37832.
Reviewed By: davidxl, hfinkel
Differential Revision: https://reviews.llvm.org/D75381
(cherry picked from commit 1adbe86d87bd4ecffc73ab17c7da56f44816f424)
|
|
Summary:
Revision a75f8d98d7ac9e557b238a229a9a2647c71feed1 fixed spacing for operators,
but caused the const and non-const versions to diverge:
```
// With Style.PointerAlignment = FormatStyle::PAS_Left:
struct A {
operator char*() { return ""; }
operator const char *() const { return ""; }
};
```
The code was checking if the type specifier was directly preceded by `operator`.
However there could be comments and `const/volatile` in between.
Reviewers: mprobst
Reviewed By: mprobst
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72911
(cherry picked from commit 33463cfba2be7c8d6c08e666123cc34f114a1f3e)
|
|
CMake doesn't seem to like it when you regex search for "^".
(cherry picked from commit 1079c68aa0fdb14d270a31c0df49a2afc5ed2485)
|
|
This is the imported target that find_package(ZLIB) defines.
Differential Revision: https://reviews.llvm.org/D74176
(cherry picked from commit 2181bf40d87165ff4c208b46b135be823eef5c55)
|
|
Using INTERFACE prevents the use of imported libraries as we've done
in 00b3d49 because these aren't linked against the target, they're
only made part of the interface. This doesn't affect the output since
static libraries aren't being linked into, but it enables the use of
imported libraries.
Differential Revision: https://reviews.llvm.org/D74106
(cherry picked from commit 50a6d3a6486d81d21a2c31ce8522321e19bed35e)
|
|
CMake is complaining about the "^" regex if the prefixes are empty
strings.
(cherry picked from commit e441a584f3f7d743ab77031a47d9ad60ee56b53d)
|
|
rG01f9abbb50b1 moved WindowsSupport.h to include/llvm/Support/Windows/
This is a problem because the modulemap include all of the Support and
ADT directories, thus any use of any header in Support or ADT would
cause the compiler to try to build WindowsSupport.h, which only works
on Windows.
Fix this by explicitly excluding WindowsSupport.h from the LLVM_Util
module.
(cherry picked from commit 0b6abe428164c38c7dec6c539e454cfd671067a4)
|
|
Highlight work that has been done during the development window. After
cherry-picking D72372 to fix PR45001 no workaround is necessary anymore,
but the generalization of the linking mechanism is still worth pointing
out.
|
|
|
|
bin/clang-tblgen -gen-diag-docs -I../clang/include \
-I../clang/include/clang/Basic/ \
../clang/include/clang/Basic/Diagnostic.td -o \
../clang/docs/DiagnosticsReference.rst && \
bin/clang-tblgen -gen-attr-docs -I../clang/include \
../clang/include/clang/Basic/Attr.td -o \
../clang/docs/AttributeReference.rst && \
bin/clang-tblgen -gen-opt-docs -I../clang/include \
-I../clang/include/clang/Driver -I../llvm/include \
../clang/include/clang/Driver/ClangOptionDocs.td -o \
../clang/docs/ClangCommandLineReference.rst
|
|
|
|
(cherry picked from commit 4612e48d2fd91d99b4ea7136017bd72ab2946430)
|
|
Process the path for libxml2 before embedding that into the command line
that is generated in `llvm-config`. Each element in the path is being
given a `-l` unconditionally which should not be the case for absolute
paths. Since the library path may be absolute or not, just apply some
CMake pre-processing when generating the path.
Before:
```
/usr/lib/x86_64-linux-gnu/libz.so -lrt -ldl -ltinfo -lpthread -lm /usr/lib/x86_64-linux-gnu/libxml2.so
```
After:
```
/usr/lib/x86_64-linux-gnu/libz.so -lrt -ldl -ltinfo -lpthread -lm -lxml2
```
Resolves PR44179!
(cherry picked from commit c3595d1069277b4ab0df49d7139b6f1bbc94f21c)
|
|
According to Joseph Myers, a libm maintainer
> They were only ever an ABI (selected by use of -ffinite-math-only or
> options implying it, which resulted in the headers using "asm" to redirect
> calls to some libm functions), not an API. The change means that ABI has
> turned into compat symbols (only available for existing binaries, not for
> anything newly linked, not included in static libm at all, not included in
> shared libm for future glibc ports such as RV32), so, yes, in any case
> where tools generate direct calls to those functions (rather than just
> following the "asm" annotations on function declarations in the headers),
> they need to stop doing so.
As a consequence, we should no longer assume these symbols are available on the
target system.
Still keep the TargetLibraryInfo for constant folding.
Differential Revision: https://reviews.llvm.org/D74712
(cherry picked from commit 6d15c4deab51498b70825fb6cefbbfe8f3d9bdcf)
For https://bugs.llvm.org/show_bug.cgi?id=45034
|
|
SROA will drop the explicit alignment on allocas when the ABI guarantees
enough alignment. Because the alignment on new load/store instructions
are set based on the alloca's alignment, that means SROA would end up
dropping the alignment from atomic loads and stores, which is not
allowed (see bug). For those, make sure to always carry over the
alignment from the previous instruction.
Differential revision: https://reviews.llvm.org/D75266
(cherry picked from commit d48c981697a49653efff9dd14fa692d99e6fa868)
|
|
llvm-ar is using CompareStringOrdinal which is available
only starting with Windows Vista (WINVER 0x600).
Fix this by hoising WindowsSupport.h, which sets _WIN32_WINNT
to 0x0601, up to llvm/include/llvm/Support and use it in llvm-ar.
Patch by Cristian Adam!
Differential revision: https://reviews.llvm.org/D74599
(cherry picked from commit 01f9abbb50b11dd26b9ccb7cb565cc955d2b9c74)
This is for https://bugs.llvm.org/show_bug.cgi?id=44907
|
|
Reviewed By: hans
Differential Revision: https://reviews.llvm.org/D75216
|
|
|
|
Differential Revision: https://reviews.llvm.org/D75125
|
|
|
|
Differential revision: https://reviews.llvm.org/D75012
|
|
This caused PR44953. See also the discussion on D74846.
This reverts commit cbc9d22e49b434b6ceb2eb94b67079d02e0a7b74.
(cherry picked from commit 7ea9a6e0220da36ff2fd1fbc29c2755be23e5166)
|
|
This corrects some typos and clarifies some points.
|
|
The code in llvmorg-10-init-12188-g25ce33a6e4f is a breaking change for
users of older linkers who don't pass a version parameter, which
prevents a drop-in clang upgrade. Old tools can't know about what future
tools will do, so as a general principle the burden should be new tools
to be compatible by default. Also, for comparison, none of the other
tests of Version within AddLinkArgs add any new behaviors unless the
version is explicitly specified. Therefore, this patch changes the
-platform_version behavior from opt-out to opt-in.
Patch by David Major!
Differential revision: https://reviews.llvm.org/D74784
(cherry picked from commit 5122e828701c88f8d53ee881bc68f3904454d154)
|
|
(PR44802)
Much like with reassociateShiftAmtsOfTwoSameDirectionShifts(),
as input, we have the following pattern:
icmp eq/ne (and ((x shift Q), (y oppositeshift K))), 0
We want to rewrite that as:
icmp eq/ne (and (x shift (Q+K)), y), 0 iff (Q+K) u< bitwidth(x)
While we know that originally (Q+K) would not overflow
(because 2 * (N-1) u<= iN -1), we may have looked past extensions of
shift amounts. so it may now overflow in smaller bitwidth.
To ensure that does not happen, we need to ensure that the total maximal
shift amount is still representable in that smaller bitwidth.
If the overflow would happen, (Q+K) u< bitwidth(x) check would be bogus.
https://bugs.llvm.org/show_bug.cgi?id=44802
(cherry picked from commit 2855c8fed9326ec44526767f1596a4fe4e55dc70)
|
|
example from PR44802
https://bugs.llvm.org/show_bug.cgi?id=44802
(cherry picked from commit 6f807ca00d951d3e74f7ea4fe1daa8e3560f4c0d)
|
|
(PR44802)
As input, we have the following pattern:
Sh0 (Sh1 X, Q), K
We want to rewrite that as:
Sh x, (Q+K) iff (Q+K) u< bitwidth(x)
While we know that originally (Q+K) would not overflow
(because 2 * (N-1) u<= iN -1), we may have looked past extensions of
shift amounts. so it may now overflow in smaller bitwidth.
To ensure that does not happen, we need to ensure that the total maximal
shift amount is still representable in that smaller bitwidth.
If the overflow would happen, (Q+K) u< bitwidth(x) check would be bogus.
https://bugs.llvm.org/show_bug.cgi?id=44802
(cherry picked from commit 781d077afb0ed9771c513d064c40170c1ccd21c9)
|
|
PR44802
https://bugs.llvm.org/show_bug.cgi?id=44802
(cherry picked from commit 425ef999385058143bb927aefe81daddcd43f623)
|
|
Reviewers: hans, nlopes, regehr
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75226
|
|
Summary: Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=42193 | hasName AST matcher is confused by extern "C" in namespace. ]]
Reviewers: klimek, aaron.ballman, gribozavr2
Reviewed By: aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D75202
(cherry picked from commit 16cabf278fc8c14d415e677ce0bc40d46a6de30d)
|
|
MC currently does not emit these relocation types, and lld does not
handle them. Add FKF_Constant as a work-around of some ARM code after
D72197. Eventually we probably should implement these relocation types.
By Fangrui Song!
Differential revision: https://reviews.llvm.org/D72892
(cherry picked from commit 2e24219d3cbfcb8c824c58872f97de0a2e94a7c8)
|
|
MemorySSA is often taking up an unreasonable fraction of runtime in
assertion enabled builds. Turns out that there is one code-path that
runs verifyMemorySSA() even if VerifyMemorySSA is not enabled. This
patch makes it conditional as well.
Differential Revision: https://reviews.llvm.org/D74505
(cherry picked from commit f0b57d8071853ec2ab459c0492854c67ea4fa93c)
|
|
It no longer applies after d7afdb596e865c11b853d8c5df7d96d594170e1c.
This reverts commit 002af0119286297dbd76b08a4a6cc4b6b87d3f26.
|
|
Pass plugins introduced in D61446 do not support dynamic linking on
Windows, hence the option LLVM_${name_upper}_LINK_INTO_TOOLS can only
work being set to "ON". Currently, it defaults to "OFF" such that such
plugins are inoperable by default on Windows. Change the default for
subprojects to follow LLVM_ENABLE_PROJECTS.
Reviewed By: serge-sans-paille, MaskRay
Differential Revision: https://reviews.llvm.org/D72372
(cherry picked from commit 6369b9bf31188bdd472299252deb6db3f650864b)
This is for PR45001.
|
|
|
|
Reviewers: anemet, Gerolf
Reviewed By: anemet
Differential Revision: https://reviews.llvm.org/D75161
|
|
This reverts commit 8d22100f66c4170510c6ff028c60672acfe1cff9.
There was a functional regression reported (https://bugs.llvm.org/show_bug.cgi?id=44996). I'm not actually sure the patch is wrong, but I don't have time to investigate currently, and this line of work isn't something I'm likely to get back to quickly.
(cherry picked from commit 14845b2c459021e3dbf2ead52d707d4a7db40cbb)
|
|
Differential revision: https://reviews.llvm.org/D75121
(cherry picked from commit 41a6612ea8afc5254e4de3aca55628d37f0be433)
|
|
This reverts https://reviews.llvm.org/D58468
(rL354676, 44037d7a6377ec8e5542cced73583283334b516b),
and all and any follow-ups to that code block.
https://bugs.llvm.org/show_bug.cgi?id=43446
(cherry picked from commit d20907d1de89bf63b589fadd8c096d4895e47fba)
|
|
See the discussion on PR44792.
This reverts commit 02ce9d8ef5a84bc884de4105eae5f8736ef67634.
|
|
This patch fixes PR44896. For IR input files, option fdiscard-value-names
should be ignored as we need named values in loadModule().
Commit 60d3947922 sets this option after loadModule() where valued names
already created. This creates an inconsistent state in setNameImpl()
that leads to a seg fault.
This patch forces fdiscard-value-names to be false for IR input files.
This patch also emits a warning of "ignoring -fdiscard-value-names" if
option fdiscard-value-names is explictly enabled in the commandline for
IR input files.
Differential Revision: https://reviews.llvm.org/D74878
(cherry picked from commit 11857d49948b845dcfd7c7f78595095e3add012d)
|
|
Summary:
Potential fix for: https://bugs.llvm.org/show_bug.cgi?id=44889 and https://bugs.llvm.org/show_bug.cgi?id=44408
In the legacy pass manager, loop rotate need not compute MemorySSA when not being in the same loop pass manager with other loop passes.
There isn't currently a way to differentiate between the two cases, so this attempts to limit the usage in LoopRotate to only update MemorySSA when the analysis is already available.
The side-effect of this is that it will split the Loop pipeline.
This issue does not apply to the new pass manager, where we have a flag specifying if all loop passes in that loop pass manager preserve MemorySSA.
Reviewers: dmgreen, fedor.sergeev, nikic
Subscribers: Prazek, hiraditya, george.burgess.iv, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74574
(cherry picked from commit 1326a5a4cfe004181f2ec8231d84ecda2b93cb25)
|
|
-fdiagnostics-color
Summary: Fixes https://github.com/clangd/clangd/issues/279. We were removing the color options but not the preceeding -Xclang which causes errors since the -Xclang would now apply to the next option in the list of options. Now, when removing a color option, we check if there was a preceeding -Xclang and remove it as well.
Patch By @DaanDeMeyer !
Reviewers: sammccall, kadircet
Reviewed By: sammccall
Subscribers: ilya-biryukov, usaxena95
Differential Revision: https://reviews.llvm.org/D75019
(cherry picked from commit da236f235028c82c2f0e00eea1f6f9c689bcae4a)
|