Skip to content

Commit 0b28b84

Browse files
committed
Merge commit 'c9124adfd8291a5f5b1d23295308d8940648c596' into ppcf128_extsoften
2 parents 87e1d4a + c9124ad commit 0b28b84

File tree

1,024 files changed

+27154
-10089
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,024 files changed

+27154
-10089
lines changed

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ jobs:
161161
'generic-no-unicode',
162162
'generic-no-wide-characters',
163163
'generic-no-rtti',
164+
'generic-optimized-speed',
164165
'generic-static',
165166
'generic-with_llvm_unwinder',
166167
# TODO Find a better place for the benchmark and bootstrapping builds to live. They're either very expensive

.github/workflows/llvm-project-tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
required: false
1515
os_list:
1616
required: false
17-
default: '["ubuntu-latest", "windows-2019", "macOS-12"]'
17+
default: '["ubuntu-latest", "windows-2019", "macOS-11"]'
1818
workflow_call:
1919
inputs:
2020
build_target:
@@ -34,7 +34,9 @@ on:
3434
type: string
3535
# Use windows-2019 due to:
3636
# https://developercommunity.visualstudio.com/t/Prev-Issue---with-__assume-isnan-/1597317
37-
default: '["ubuntu-latest", "windows-2019", "macOS-12"]'
37+
# We're using a specific version of macOS due to:
38+
# https://github.com/actions/virtual-environments/issues/5900
39+
default: '["ubuntu-latest", "windows-2019", "macOS-11"]'
3840

3941
concurrency:
4042
# Skip intermediate builds: always.
@@ -89,6 +91,10 @@ jobs:
8991
variant: sccache
9092
- name: Build and Test
9193
uses: llvm/actions/build-test-llvm-project@main
94+
env:
95+
# Workaround for https://github.com/actions/virtual-environments/issues/5900.
96+
# This should be a no-op for non-mac OSes
97+
PKG_CONFIG_PATH: /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig//12
9298
with:
9399
cmake_args: '-GNinja -DLLVM_ENABLE_PROJECTS="${{ inputs.projects }}" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLDB_INCLUDE_TESTS=OFF -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ${{ inputs.extra_cmake_args }}'
94100
build_target: '${{ inputs.build_target }}'

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# The LLVM Compiler Infrastructure
22

33
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/llvm/llvm-project/badge)](https://securityscorecards.dev/viewer/?uri=github.com/llvm/llvm-project)
4+
[![libc++](https://github.com/llvm/llvm-project/actions/workflows/libcxx-build-and-test.yaml/badge.svg?branch=main&event=schedule)](https://github.com/llvm/llvm-project/actions/workflows/libcxx-build-and-test.yaml?query=event%3Aschedule)
45

56
Welcome to the LLVM project!
67

bolt/lib/Rewrite/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set(LLVM_LINK_COMPONENTS
55
MC
66
Object
77
Support
8+
DWARFLinkerBase
89
DWARFLinker
910
AsmPrinter
1011
TargetParser

bolt/lib/Rewrite/DWARFRewriter.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "llvm/BinaryFormat/Dwarf.h"
2222
#include "llvm/CodeGen/AsmPrinter.h"
2323
#include "llvm/CodeGen/DIE.h"
24-
#include "llvm/DWARFLinker/DWARFStreamer.h"
24+
#include "llvm/DWARFLinker/Classic/DWARFStreamer.h"
2525
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
2626
#include "llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h"
2727
#include "llvm/DebugInfo/DWARF/DWARFDebugLoc.h"
@@ -178,6 +178,9 @@ translateInputToOutputLocationList(const BinaryFunction &BF,
178178
return MergedLL;
179179
}
180180

181+
using namespace dwarf_linker;
182+
using namespace dwarf_linker::classic;
183+
181184
namespace llvm {
182185
namespace bolt {
183186
/// Emits debug information into .debug_info or .debug_types section.
@@ -278,10 +281,10 @@ class DIEStreamer : public DwarfStreamer {
278281

279282
public:
280283
DIEStreamer(DIEBuilder *DIEBldr, DWARFRewriter &Rewriter,
281-
DWARFLinker::OutputFileType OutFileType,
284+
DWARFLinkerBase::OutputFileType OutFileType,
282285
raw_pwrite_stream &OutFile,
283286
std::function<StringRef(StringRef Input)> Translator,
284-
DWARFLinker::messageHandler Warning)
287+
DWARFLinkerBase::MessageHandlerTy Warning)
285288
: DwarfStreamer(OutFileType, OutFile, Translator, Warning),
286289
DIEBldr(DIEBldr), Rewriter(Rewriter){};
287290

@@ -457,7 +460,7 @@ createDIEStreamer(const Triple &TheTriple, raw_pwrite_stream &OutFile,
457460
DWARFRewriter &Rewriter) {
458461

459462
std::unique_ptr<DIEStreamer> Streamer = std::make_unique<DIEStreamer>(
460-
&DIEBldr, Rewriter, llvm::DWARFLinker::OutputFileType::Object, OutFile,
463+
&DIEBldr, Rewriter, DWARFLinkerBase::OutputFileType::Object, OutFile,
461464
[](StringRef Input) -> StringRef { return Input; },
462465
[&](const Twine &Warning, StringRef Context, const DWARFDie *) {});
463466
Error Err = Streamer->init(TheTriple, Swift5ReflectionSegmentName);

bolt/test/RISCV/relax.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
// CHECK: Binary Function "_start" after building cfg {
88
// CHECK: jal ra, near_f
9-
// CHECK-NEXT: auipc ra, far_f@plt
9+
// CHECK-NEXT: auipc ra, far_f
1010
// CHECK-NEXT: jalr ra, 0xc(ra)
1111
// CHECK-NEXT: j near_f
1212

clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ ExpandModularHeadersPPCallbacks::ExpandModularHeadersPPCallbacks(
100100
/*OwnsHeaderSearch=*/false);
101101
PP->Initialize(Compiler.getTarget(), Compiler.getAuxTarget());
102102
InitializePreprocessor(*PP, *PO, Compiler.getPCHContainerReader(),
103-
Compiler.getFrontendOpts());
103+
Compiler.getFrontendOpts(), Compiler.getCodeGenOpts());
104104
ApplyHeaderSearchOptions(*HeaderInfo, *HSO, LangOpts,
105105
Compiler.getTarget().getTriple());
106106
}

clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ class UnusedUsingDeclsCheck : public ClangTidyCheck {
2626
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
2727
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
2828
void onEndOfTranslationUnit() override;
29+
bool isLanguageVersionSupported(const LangOptions &LangOpts) const override {
30+
return LangOpts.CPlusPlus;
31+
}
2932

3033
private:
3134
void removeFromFoundDecls(const Decl *D);

clang-tools-extra/clangd/AST.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ const TemplateTypeParmType *getFunctionPackType(const FunctionDecl *Callee) {
757757
// Returns the template parameter pack type that this parameter was expanded
758758
// from (if in the Args... or Args&... or Args&&... form), if this is the case,
759759
// nullptr otherwise.
760-
const TemplateTypeParmType *getUnderylingPackType(const ParmVarDecl *Param) {
760+
const TemplateTypeParmType *getUnderlyingPackType(const ParmVarDecl *Param) {
761761
const auto *PlainType = Param->getType().getTypePtr();
762762
if (auto *RT = dyn_cast<ReferenceType>(PlainType))
763763
PlainType = RT->getPointeeTypeAsWritten().getTypePtr();
@@ -793,8 +793,8 @@ class ForwardingCallVisitor
793793
: public RecursiveASTVisitor<ForwardingCallVisitor> {
794794
public:
795795
ForwardingCallVisitor(ArrayRef<const ParmVarDecl *> Parameters)
796-
: Parameters{Parameters}, PackType{getUnderylingPackType(
797-
Parameters.front())} {}
796+
: Parameters{Parameters},
797+
PackType{getUnderlyingPackType(Parameters.front())} {}
798798

799799
bool VisitCallExpr(CallExpr *E) {
800800
auto *Callee = getCalleeDeclOrUniqueOverload(E);
@@ -859,7 +859,7 @@ class ForwardingCallVisitor
859859
if (const auto *TTPT = getFunctionPackType(Callee)) {
860860
// In this case: Separate the parameters into head, pack and tail
861861
auto IsExpandedPack = [&](const ParmVarDecl *P) {
862-
return getUnderylingPackType(P) == TTPT;
862+
return getUnderlyingPackType(P) == TTPT;
863863
};
864864
ForwardingInfo FI;
865865
FI.Head = MatchingParams.take_until(IsExpandedPack);
@@ -964,7 +964,7 @@ resolveForwardingParameters(const FunctionDecl *D, unsigned MaxDepth) {
964964
if (const auto *TTPT = getFunctionPackType(D)) {
965965
// Split the parameters into head, pack and tail
966966
auto IsExpandedPack = [TTPT](const ParmVarDecl *P) {
967-
return getUnderylingPackType(P) == TTPT;
967+
return getUnderlyingPackType(P) == TTPT;
968968
};
969969
ArrayRef<const ParmVarDecl *> Head = Parameters.take_until(IsExpandedPack);
970970
ArrayRef<const ParmVarDecl *> Pack =
@@ -1016,7 +1016,7 @@ resolveForwardingParameters(const FunctionDecl *D, unsigned MaxDepth) {
10161016
}
10171017

10181018
bool isExpandedFromParameterPack(const ParmVarDecl *D) {
1019-
return getUnderylingPackType(D) != nullptr;
1019+
return getUnderlyingPackType(D) != nullptr;
10201020
}
10211021

10221022
} // namespace clangd

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,8 @@ Changes in existing checks
368368
<clang-tidy/checks/misc/const-correctness>` check to avoid false positive when
369369
using pointer to member function. Additionally, the check no longer emits
370370
a diagnostic when a variable that is not type-dependent is an operand of a
371-
type-dependent binary operator.
371+
type-dependent binary operator. Improved performance of the check through
372+
optimizations.
372373

373374
- Improved :doc:`misc-include-cleaner
374375
<clang-tidy/checks/misc/include-cleaner>` check by adding option
@@ -382,7 +383,7 @@ Changes in existing checks
382383

383384
- Improved :doc:`misc-unused-using-decls
384385
<clang-tidy/checks/misc/unused-using-decls>` check to avoid false positive when
385-
using in elaborated type.
386+
using in elaborated type and only check cpp files.
386387

387388
- Improved :doc:`modernize-avoid-bind
388389
<clang-tidy/checks/modernize/avoid-bind>` check to

clang/docs/InternalsManual.rst

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3364,7 +3364,7 @@ Multiple occurrences accumulate prefixes. For example,
33643364

33653365
Specifying Diagnostics
33663366
^^^^^^^^^^^^^^^^^^^^^^
3367-
Indicating that a line expects an error or a warning is simple. Put a comment
3367+
Indicating that a line expects an error or a warning is easy. Put a comment
33683368
on the line that has the diagnostic, use
33693369
``expected-{error,warning,remark,note}`` to tag if it's an expected error,
33703370
warning, remark, or note (respectively), and place the expected text between
@@ -3373,6 +3373,9 @@ enough to ensure that the correct diagnostic was emitted. (Note: full text
33733373
should be included in test cases unless there is a compelling reason to use
33743374
truncated text instead.)
33753375

3376+
For a full description of the matching behavior, including more complex
3377+
matching scenarios, see :ref:`matching <DiagnosticMatching>` below.
3378+
33763379
Here's an example of the most commonly used way to specify expected
33773380
diagnostics:
33783381

@@ -3458,8 +3461,33 @@ A range can also be specified by ``<n>-<m>``. For example:
34583461

34593462
In this example, the diagnostic may appear only once, if at all.
34603463

3464+
.. _DiagnosticMatching:
3465+
3466+
Matching Modes
3467+
~~~~~~~~~~~~~~
3468+
3469+
The default matching mode is simple string, which looks for the expected text
3470+
that appears between the first `{{` and `}}` pair of the comment. The string is
3471+
interpreted just as-is, with one exception: the sequence `\n` is converted to a
3472+
single newline character. This mode matches the emitted diagnostic when the
3473+
text appears as a substring at any position of the emitted message.
3474+
3475+
To enable matching against desired strings that contain `}}` or `{{`, the
3476+
string-mode parser accepts opening delimiters of more than two curly braces,
3477+
like `{{{`. It then looks for a closing delimiter of equal "width" (i.e `}}}`).
3478+
For example:
3479+
3480+
.. code-block:: c++
3481+
3482+
// expected-note {{{evaluates to '{{2, 3, 4}} == {0, 3, 4}'}}}
3483+
3484+
The intent is to allow the delimeter to be wider than the longest `{` or `}`
3485+
brace sequence in the content, so that if your expected text contains `{{{`
3486+
(three braces) it may be delimited with `{{{{` (four braces), and so on.
3487+
34613488
Regex matching mode may be selected by appending ``-re`` to the diagnostic type
3462-
and including regexes wrapped in double curly braces in the directive, such as:
3489+
and including regexes wrapped in double curly braces (`{{` and `}}`) in the
3490+
directive, such as:
34633491

34643492
.. code-block:: text
34653493
@@ -3471,6 +3499,8 @@ Examples matching error: "variable has incomplete type 'struct s'"
34713499

34723500
// expected-error {{variable has incomplete type 'struct s'}}
34733501
// expected-error {{variable has incomplete type}}
3502+
// expected-error {{{variable has incomplete type}}}
3503+
// expected-error {{{{variable has incomplete type}}}}
34743504

34753505
// expected-error-re {{variable has type 'struct {{.}}'}}
34763506
// expected-error-re {{variable has type 'struct {{.*}}'}}

clang/docs/ReleaseNotes.rst

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,8 @@ Improvements to Clang's diagnostics
520520
- Clang now diagnoses narrowing conversions involving const references.
521521
(`#63151: <https://github.com/llvm/llvm-project/issues/63151>`_).
522522
- Clang now diagnoses unexpanded packs within the template argument lists of function template specializations.
523+
- Clang now diagnoses attempts to bind a bitfield to an NTTP of a reference type as erroneous
524+
converted constant expression and not as a reference to subobject.
523525

524526

525527
Improvements to Clang's time-trace
@@ -610,7 +612,8 @@ Bug Fixes in This Version
610612
of template classes. Fixes
611613
(`#68543 <https://github.com/llvm/llvm-project/issues/68543>`_,
612614
`#42496 <https://github.com/llvm/llvm-project/issues/42496>`_,
613-
`#77071 <https://github.com/llvm/llvm-project/issues/77071>`_)
615+
`#77071 <https://github.com/llvm/llvm-project/issues/77071>`_,
616+
`#77411 <https://github.com/llvm/llvm-project/issues/77411>`_)
614617
- Fixed an issue when a shift count larger than ``__INT64_MAX__``, in a right
615618
shift operation, could result in missing warnings about
616619
``shift count >= width of type`` or internal compiler error.
@@ -696,6 +699,12 @@ Bug Fixes in This Version
696699
- Clang now accepts recursive non-dependent calls to functions with deduced
697700
return type.
698701
Fixes (`#71015 <https://github.com/llvm/llvm-project/issues/71015>`_)
702+
- Fix assertion failure when initializing union containing struct with
703+
flexible array member using empty initializer list.
704+
Fixes (`#77085 <https://github.com/llvm/llvm-project/issues/77085>`_)
705+
- Fix assertion crash due to failed scope restoring caused by too-early VarDecl
706+
invalidation by invalid initializer Expr.
707+
Fixes (`#30908 <https://github.com/llvm/llvm-project/issues/30908>`_)
699708

700709

701710
Bug Fixes to Compiler Builtins
@@ -933,6 +942,14 @@ X86 Support
933942
- Support ISA of ``AVX10.1``.
934943
- ``-march=pantherlake`` and ``-march=clearwaterforest`` are now supported.
935944
- Added ABI handling for ``__float128`` to match with GCC.
945+
- Emit warnings for options to enable knl/knm specific ISAs: AVX512PF, AVX512ER
946+
and PREFETCHWT1. From next version (LLVM 19), these ISAs' intrinsic supports
947+
will be deprecated:
948+
* intrinsic series of *_exp2a23_*
949+
* intrinsic series of *_rsqrt28_*
950+
* intrinsic series of *_rcp28_*
951+
* intrinsic series of *_prefetch_i[3|6][2|4]gather_*
952+
* intrinsic series of *_prefetch_i[3|6][2|4]scatter_*
936953

937954
Arm and AArch64 Support
938955
^^^^^^^^^^^^^^^^^^^^^^^
@@ -1150,9 +1167,10 @@ Improvements
11501167
^^^^^^^^^^^^
11511168

11521169
- Improved the ``unix.StdCLibraryFunctions`` checker by modeling more
1153-
functions like ``send``, ``recv``, ``readlink``, ``fflush``, ``mkdtemp`` and
1154-
``errno`` behavior.
1170+
functions like ``send``, ``recv``, ``readlink``, ``fflush``, ``mkdtemp``,
1171+
``getcwd`` and ``errno`` behavior.
11551172
(`52ac71f92d38 <https://github.com/llvm/llvm-project/commit/52ac71f92d38f75df5cb88e9c090ac5fd5a71548>`_,
1173+
`#77040 <https://github.com/llvm/llvm-project/pull/77040>`_,
11561174
`#76671 <https://github.com/llvm/llvm-project/pull/76671>`_,
11571175
`#71373 <https://github.com/llvm/llvm-project/pull/71373>`_,
11581176
`#76557 <https://github.com/llvm/llvm-project/pull/76557>`_,

0 commit comments

Comments
 (0)